00:02:55 | FromDiscord | <Patitotective> :[[ |
00:14:45 | FromDiscord | <Girvo> In reply to @Patitotective ":[[": Yeah I had the same reaction when I bumped into that a few weeks ago haha |
00:25:02 | FromDiscord | <Elegantbeef> It should work then |
00:25:06 | FromDiscord | <Elegantbeef> It might need `--experimental:overloadableEnums` |
00:49:53 | FromDiscord | <Patitotective> In reply to @Elegantbeef "It might need `--experimental:overloadableEnums`": nope |
00:50:16 | FromDiscord | <Rika> Beef I think that’s something else |
00:57:41 | FromDiscord | <Girvo> Anyone have any idea how many concurrent TCP connections asyncnet can handle? |
01:07:19 | * | arkurious quit (Remote host closed the connection) |
01:07:27 | FromDiscord | <Bung> try chronos |
02:36:17 | FromDiscord | <aquova> This is probably a dumb question, but is there a way to easily (aka with the std) download a web page after it has been rendered with JS? I'm new to scraping, but I've only been able to get the initial HTML of a page |
02:37:04 | FromDiscord | <aquova> (edit) "JS?" => "JS, or does it require more sophisticated packages?" |
02:41:21 | FromDiscord | <Elegantbeef> https://github.com/dom96/webdriver might work i dont really know |
02:41:45 | FromDiscord | <Elegantbeef> If you dont need JS to run you can just get the url, otherwise yea you need some proper driver |
03:39:59 | FromDiscord | <Bung> anyone who can cancel the CI? https://github.com/nim-lang/Nim/pull/20438 |
04:13:46 | FromDiscord | <Bubblie> Is thrre anything like hashmaps in nim |
04:13:49 | FromDiscord | <Bubblie> Or python dictionaries |
04:14:24 | FromDiscord | <Elegantbeef> std/tables |
04:22:59 | * | ixmpp quit (Ping timeout: 248 seconds) |
04:23:12 | * | droidrage quit (Ping timeout: 264 seconds) |
04:29:05 | FromDiscord | <Bubblie> thanks |
05:24:31 | FromDiscord | <Girvo> I wonder how many concurrent connections Chronos can handle, considering it explicitly lists multithreaded stream servers are "todo" |
05:28:59 | FromDiscord | <Girvo> Guess I can just chuck multiple processes at it, considering its all `SO_REUSEADDR` |
05:30:46 | FromDiscord | <Bung> concurrent does not equals to multithreaded |
05:30:53 | FromDiscord | <Girvo> I am well aware |
05:32:00 | FromDiscord | <Bung> https://github.com/dom96/httpbeast is highest rank in performance benchmark |
05:32:31 | FromDiscord | <Girvo> Unless I can leverage the internal TCP bits of it, sadly it's not a good fit, as we're not using HTTP for our comms |
05:35:29 | FromDiscord | <Bung> ok then. |
05:36:13 | * | Goodbye_Vincent joined #nim |
05:36:25 | FromDiscord | <Girvo> Would be perfect if we were though 🙂 |
05:36:52 | FromDiscord | <Bung> https://github.com/nim-lang/Nim/pull/20423 @ElegantBeef any idea ? `C` going there is tyStatic, `result.f` is on runtime |
05:38:28 | FromDiscord | <Elegantbeef> I'd wager it cannot generate the lit from the generic parameter, i dont really know |
05:39:26 | FromDiscord | <Bung> `const d = C` but this one work |
05:39:45 | FromDiscord | <Elegantbeef> `const` doesnt go to the backend |
05:41:38 | FromDiscord | <Bung> so what will happen it assign const to var , I thought reuse that evaluted static(value) |
05:42:07 | FromDiscord | <Elegantbeef> It does but it causes the backend to generate code |
05:42:31 | FromDiscord | <Elegantbeef> `genLiteral(nkObjConstr)` Notice it's a `gen` procedure |
05:42:47 | FromDiscord | <Elegantbeef> which means it's erroring when it's attempting to emit the C code |
05:42:58 | FromDiscord | <Bung> it never worked before ? |
05:43:07 | FromDiscord | <Elegantbeef> No clue |
05:43:23 | FromDiscord | <Elegantbeef> It should |
05:48:11 | FromDiscord | <Bung> sent a code paste, see https://play.nim-lang.org/#ix=4byM |
05:51:41 | FromDiscord | <Elegantbeef> Yea i dont even know if it should be a literal |
05:51:57 | FromDiscord | <Elegantbeef> Doesnt make much sense to go that path |
05:52:30 | * | ixmpp joined #nim |
05:53:53 | FromDiscord | <Elegantbeef> Do you have the stack trace for how it gets into there? |
05:57:16 | FromDiscord | <Bung> the previous behavior is it strip out static when param checked pass, now we have inner generic instantiating, so here it remain as typ.kind = `tyStatic` |
05:58:32 | FromDiscord | <Bung> sent a code paste, see https://play.nim-lang.org/#ix=4byO |
05:59:03 | FromDiscord | <Elegantbeef> Oh it erros in vmgen |
05:59:03 | FromDiscord | <Elegantbeef> That's interesting |
05:59:51 | FromDiscord | <Bung> that's after I modify the flow, it error another |
06:00:00 | FromDiscord | <Bung> sent a code paste, see https://play.nim-lang.org/#ix=4byP |
06:02:29 | FromDiscord | <Bung> that's make the error stay in sem pass stage, since it shouldn't go code gen |
06:06:00 | FromDiscord | <Bung> current workaround is `const d = C; result.f = d` |
06:09:29 | FromDiscord | <Bung> another idea is maybe should put the const value when default result construct . |
06:10:47 | FromDiscord | <Bung> in semantic we should not assign that field |
06:11:31 | FromDiscord | <Elegantbeef> That only works if you dont have flow control |
06:11:47 | FromDiscord | <Elegantbeef> I do not know how to resolve that issue, simpler variants work fine afaict |
06:14:56 | FromDiscord | <Bung> you mean simpler as tests\generics\t10833.nim ? it works ,indeed |
06:17:08 | FromDiscord | <Bung> think I'll wait for review, since the compiler never goes there before. |
06:40:49 | * | m5zs7k quit (Ping timeout: 250 seconds) |
06:44:38 | * | m5zs7k joined #nim |
07:03:06 | * | kenran joined #nim |
07:32:28 | FromDiscord | <Mrcool> can I use nimscript externally something like↵`nim --nimscript eval myscript` |
07:32:36 | FromDiscord | <Mrcool> (edit) "myscript`" => "myscript.nim`" |
07:32:59 | FromDiscord | <Elegantbeef> It can be used like that yes |
07:33:12 | FromDiscord | <Elegantbeef> should just be `nim eval` iirc |
07:33:27 | FromDiscord | <Elegantbeef> Only a subset of Nim is allowed though |
07:34:34 | FromDiscord | <Mrcool> whats the real command xD what I wrote is just an what I imagined as syntax |
07:34:59 | FromDiscord | <Elegantbeef> `nim eval myscript.nim` |
07:35:10 | FromDiscord | <Elegantbeef> or is it `e` |
07:35:12 | FromDiscord | <Elegantbeef> I always forget |
07:35:53 | FromDiscord | <Mrcool> e works and eval doesn't |
07:36:07 | FromDiscord | <Mrcool> what a weird design choice xD |
07:39:39 | FromDiscord | <Mrcool> can I turn off those hints, I want to run the script as fast as possible https://media.discordapp.net/attachments/371759389889003532/1024223781872476191/unknown.png |
07:40:04 | FromDiscord | <Elegantbeef> `--verbosity:0` |
07:40:07 | FromDiscord | <Elegantbeef> wont make it much faster |
07:41:44 | FromDiscord | <Mrcool> it feels slow still for a scripting lang run on a vm https://media.discordapp.net/attachments/371759389889003532/1024224303702614087/unknown.png |
07:42:29 | FromDiscord | <Elegantbeef> it's mainly just for macros,config, and cte |
07:43:49 | FromDiscord | <Mrcool> my idea was to use it for inim or something similar, since I think the subset that is handled is enough for the user most of time, and if the user wants to use the full lang, he can just issue a command to the repl |
07:45:16 | FromDiscord | <fbpyr> @Mrcool\: if you want to speed up inim\: I found it to be more snappy using c-compiler\: tcc |
07:52:10 | FromDiscord | <Bung> well , `nim e ` is not the way you use in production |
07:54:47 | FromDiscord | <Bung> in the compiler , does template type should match proc type ? |
08:31:21 | FromDiscord | <Horizon [She/Her]> In reply to @Mrcool "it feels slow still": Yeah that's an issue, if it worked fast, that'd be great ngl |
08:31:35 | FromDiscord | <Horizon [She/Her]> Since then embedding it as a scripting engine in games would be nice |
09:17:34 | * | sagax quit (Ping timeout: 246 seconds) |
10:21:36 | * | jmdaemon quit (Ping timeout: 260 seconds) |
10:46:29 | * | arkurious joined #nim |
11:01:51 | * | vicecea quit (Remote host closed the connection) |
11:02:22 | * | vicecea joined #nim |
11:15:19 | * | pro joined #nim |
11:18:31 | * | pro quit (Client Quit) |
11:24:01 | FromDiscord | <auxym> I read somewhere on the forums that the nim vm was comparable in speed to python |
11:45:14 | FromDiscord | <Horizon [She/Her]> Probably not true now, Python has been speeding up a lot recently |
11:45:20 | FromDiscord | <Horizon [She/Her]> I think they added a JIT too |
11:45:49 | FromDiscord | <Prestige> Iirc nim vm also slowed down a lot |
11:51:30 | FromDiscord | <Horizon [She/Her]> That isn't fun lol |
11:52:07 | FromDiscord | <Horizon [She/Her]> Nimskull has made the VM it's own backend and it has it's own bytecode format (unstable format tho since it changes a bit iirc), it's way faster from when i tried it |
12:16:05 | FromDiscord | <Rainbow Asteroids> In reply to @Event Horizon "Since then embedding it": beef is coming to tell you about wasm |
12:18:33 | * | kenran quit (Changing host) |
12:18:33 | * | kenran joined #nim |
12:33:19 | FromDiscord | <Prestige> Haha |
12:34:13 | FromDiscord | <Prestige> I don't really write any nimscript or python, don't have a use for either. Can just write stuff in Nim and compile |
12:34:43 | FromDiscord | <Prestige> I don't think any application that really needs performance would choose python regardless |
12:37:31 | FromDiscord | <!&luke> In reply to @Mrcool "it feels slow still": Yea cuz eval is not for production |
12:41:07 | * | kenran quit (Quit: ERC 5.4.1 (IRC client for GNU Emacs 29.0.50)) |
12:41:57 | * | kenran joined #nim |
12:42:24 | * | xaltsc quit (Remote host closed the connection) |
12:42:56 | * | kenran quit (Client Quit) |
13:01:11 | FromDiscord | <ChocolettePalette> Why↵(@!&luke) |
13:03:42 | FromDiscord | <!&luke> Because first of all it doesn't compile with -d:release |
13:04:13 | FromDiscord | <Rika> ? |
13:04:23 | FromDiscord | <ChocolettePalette> Compile it with -d\:debug then |
13:04:29 | FromDiscord | <Rika> The VM doesn’t have a release mode I don’t recall |
13:04:36 | FromDiscord | <!&luke> In reply to @Rika "The VM doesn’t have": Yea |
13:04:40 | FromDiscord | <!&luke> That's why it cant |
13:04:42 | FromDiscord | <Rika> Not sure what you mean then |
13:05:00 | FromDiscord | <!&luke> A Nim release build will always be faster |
13:05:08 | FromDiscord | <Rika> That doesn’t mean it’s not for production |
13:05:10 | FromDiscord | <Rika> Of course |
13:05:16 | FromDiscord | <Rika> Depends on your use case really |
13:05:36 | FromDiscord | <Rika> I guess in the given image’s exact context yea |
13:05:40 | FromDiscord | <!&luke> In reply to @Rika "Depends on your use": Well for most cases |
13:05:45 | FromDiscord | <Rika> But otherwise it can be a different story |
13:07:17 | FromDiscord | <auxym> In reply to @Avahe "I don't think any": most modern data science/numerical programs have entered the chat 😉 but those mostly use python as an interface to high-performance C and fortran libs |
13:07:31 | FromDiscord | <Prestige> Yeah |
13:07:43 | FromDiscord | <Prestige> Would be great to see Nim break into that space more |
13:08:02 | FromDiscord | <Prestige> But I doubt that'll ever happen if editor support doesn't vastly improve |
13:08:58 | FromDiscord | <auxym> we do have #science but yeah. python's library ecosystem has huge inertia, plus there's also strong competition in the space (thinking of julia mostly) |
13:21:31 | FromDiscord | <Require Support> anyone test `https://github.com/cheatfate/asynctools` with `chronos` for async namedpipes on windows? |
13:21:35 | * | pro joined #nim |
13:21:44 | FromDiscord | <Require Support> (edit) "`https://github.com/cheatfate/asynctools`" => "https://github.com/cheatfate/asynctools" |
13:27:20 | FromDiscord | <4zv4l> I don't understand what the `nodecl` pragma is for |
13:27:35 | FromDiscord | <4zv4l> I don't get it |
13:27:38 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4bAL |
13:27:43 | FromDiscord | <4zv4l> doesn't need to pretend, it is a variable |
13:29:13 | FromDiscord | <Rika> It means “no declaration” as in there’s no declaration in the Nim code but it is declared outside of Nim |
13:29:27 | FromDiscord | <Rika> I think that’s a good explanation, not sure |
13:30:38 | FromDiscord | <4zv4l> I think I see but still blurry like |
13:30:49 | FromDiscord | <4zv4l> it's importing from the C code but still has to declare it in the Nim code |
13:39:03 | * | kenran joined #nim |
13:40:16 | FromDiscord | <Horizon [She/Her]> In reply to @Rainbow Asteroids "*beef is coming to": WASM is nice but not exactly easy for beginners :p |
13:40:20 | FromDiscord | <Horizon [She/Her]> Or convenient lmao |
13:42:31 | * | kenran` joined #nim |
13:44:48 | FromDiscord | <4zv4l> is there a way to convert a `Socket` to a `SocketHandle` ? |
13:45:10 | FromDiscord | <4zv4l> I have a C code using socket `fd` and I wanna use it with as less `nativesockets` code as possible |
13:45:19 | * | pro1 joined #nim |
13:45:53 | FromDiscord | <4zv4l> found `getFd` hope that will do the trick |
13:46:23 | * | kenran quit (Ping timeout: 268 seconds) |
13:46:45 | * | pro quit (Ping timeout: 252 seconds) |
13:47:26 | FromDiscord | <4zv4l> ah yes, but the function returns a int (since there is no boolean in C), I tried changing the type to bool thinking nim could translate it but it seems it can't |
13:48:23 | FromDiscord | <Require Support> In reply to @Require Support "anyone test https://github.com/cheatfate/asynctools": just noticed https://github.com/status-im/nim-chronos/blob/93800879fdea3809c135e44d1c3249b325a191ca/chronos/handles.nim has `createAsyncPipe` |
13:50:03 | FromDiscord | <4zv4l> how can I use `bool` with `importc` ? |
13:52:01 | * | kenran` is now known as kenran |
13:54:49 | FromDiscord | <4zv4l> adding nodecl pragma did the trick |
13:57:55 | FromDiscord | <4zv4l> damn that's so nice to import C code just like that |
13:58:38 | FromDiscord | <4zv4l> there is no `ffi` to interact with C right ? since it compiles to C it copy paste the code to the final source code ? |
14:03:21 | * | kenran quit (Remote host closed the connection) |
14:03:53 | * | kenran joined #nim |
14:04:39 | FromDiscord | <4zv4l> so many questions omg |
14:05:14 | FromDiscord | <4zv4l> if I give a `seq[string]` to a C function accepting a `char` will it increase the `seq` automatically or I still need to call `realloc` in the C function ? |
14:08:48 | * | pro1 quit (Ping timeout: 244 seconds) |
14:10:28 | qwr | increase what? realloc why? |
14:17:59 | FromDiscord | <Bung> if you dont plan contribute to compiler , you dont need worry about these |
14:18:20 | qwr | maybe read documentation? https://nim-lang.org/docs/manual.html#foreign-function-interface |
14:18:52 | qwr | (for 4zv4l, who seemed a bit confused) |
14:19:34 | FromDiscord | <4zv4l> In reply to @qwr "increase what? realloc why?": I use a buffer to add data in it |
14:19:40 | FromDiscord | <4zv4l> but the buffer is passed to a C function |
14:19:58 | FromDiscord | <4zv4l> the C function doesn't realloc the buffer but since Nim gives it a `seq` will it realloc ? |
14:20:11 | FromDiscord | <Bung> the basic question is how you pass seq to c function |
14:20:23 | FromDiscord | <4zv4l> I didn't check if that's possible |
14:20:25 | FromDiscord | <4zv4l> I was just wondering |
14:20:49 | FromDiscord | <4zv4l> but now you say that maybe that's not possible to pass a seq to a c function |
14:21:12 | qwr | afaik nim promises nothing about seq type internal implementation, so if manipulate it in C function, it might well not work with next nim release |
14:21:38 | FromDiscord | <Bung> you'll find a solution, instead of thinking how the underline works |
14:24:51 | FromDiscord | <4zv4l> I think my C code is just bad, and I thought I could use a `seq` to 'hide/fix' the wrong implementation |
14:25:31 | FromDiscord | <4zv4l> In reply to @qwr "maybe read documentation? https://nim-lang.org/docs": yeah I still don't totally know how ffi works but it has a cost to use ffi right ? |
14:29:34 | FromDiscord | <4zv4l> Like if Zig doesn't need ffi↵https://ziglang.org/learn/overview/#integration-with-c-libraries-without-ffibindings↵so I wonder why Nim needs ffi since it compiles to C |
14:30:52 | FromDiscord | <Bung> when we say ffi , usually means we want intergate with external lib |
14:31:29 | FromDiscord | <4zv4l> can you explain me more what you mean please ? |
14:31:45 | FromDiscord | <Bung> you cant promise you will write all code in nim in real project |
14:33:11 | FromDiscord | <Bung> https://nim-lang.org/docs/dynlib.html#examples-loading-a-simple-c-function |
14:33:21 | FromDiscord | <Bung> read std lib is good for you |
14:34:35 | FromDiscord | <flywind> In reply to @4zv4l "Like if Zig doesn't": It's easy if you get a c parser, which means zig cc depends on clang to parse c code. |
14:36:33 | FromDiscord | <4zv4l> oh wait, maybe that's my bad, `ffi` are used for pre compiled library right ? |
14:36:42 | FromDiscord | <4zv4l> so when I import a `.c` it doesn't use ffi right ? |
14:36:59 | FromDiscord | <flywind> Nim has got one like https://github.com/PMunch/futhark to automatic wrap of C headers in Nim based on clang |
14:37:18 | FromDiscord | <flywind> (edit) "automatic" => "automaticaly" | removed "of" |
14:38:09 | FromDiscord | <flywind> In reply to @4zv4l "yeah I still don't": It is zero overhead c interface. |
14:38:29 | FromDiscord | <flywind> In reply to @4zv4l "yeah I still don't": No |
14:38:52 | FromDiscord | <auxym> In reply to @4zv4l "so when I import": what do you mean "import a .c"? using `{.importc.}` is ffi |
14:39:34 | FromDiscord | <4zv4l> I mean a ddl is a compiled lib |
14:39:40 | FromDiscord | <4zv4l> while a `.c` is not compiled yet |
14:40:30 | FromDiscord | <4zv4l> In reply to @flywind "No": no cost alright, cause I saw for example https://stackoverflow.com/questions/14519905/how-much-does-it-cost-for-haskell-ffi-to-go-into-c-and-back↵telling (it's not for Nim I know) that it can have a cost |
14:41:17 | FromDiscord | <4zv4l> sent a long message, see http://ix.io/4bBc |
14:41:25 | FromDiscord | <4zv4l> I know Nim isnt Haskell and I don't even know Haskell |
14:42:37 | FromDiscord | <flywind> > Zero-overhead interop lets you reuse code in C, C++ (including templates, C++ STL), JS, Objective-C, Python (via nimpy). |
14:42:54 | FromDiscord | <flywind> Using c types means no overhead for Nim. |
14:43:30 | FromDiscord | <4zv4l> are c type all type starting with `c` ↵or Nim can guess when you write `int` change it to `cint` ? |
14:44:36 | FromDiscord | <Bung> first yes, second no |
14:45:03 | FromDiscord | <auxym> nim emits for int a macro like `NI` which is not guaranteed to be compatible with `int` in C, but in practice is compatible on most platforms. Still, recommended practice for C interop is to use cint and co, or importc your own types |
14:45:45 | FromDiscord | <Bung> they means types name in nim |
14:45:50 | FromDiscord | <4zv4l> alright, what about bool ?↵because I just used that few minuts ago |
14:45:56 | FromDiscord | <4zv4l> there isn't cbool |
14:46:18 | FromDiscord | <Bung> just 0 , 1 |
14:46:19 | FromDiscord | <4zv4l> or then I use cint |
14:46:38 | FromDiscord | <Bung> they are defined same in many languages |
14:47:49 | FromDiscord | <4zv4l> alright, thank you ! ^^↵I've no particular reason to get into performance now, even more than I'm not really a dev↵just idk, still always wonder how languages handle those things |
14:47:56 | FromDiscord | <4zv4l> Nim is really interesting |
14:51:51 | FromDiscord | <Bung> NP |
14:52:21 | FromDiscord | <4zv4l> just found Nim was first written in Pascal |
14:52:28 | FromDiscord | <4zv4l> also quite interesting |
14:52:42 | NimEventer | New thread by miran: Nim 1.6.8 released!, see https://forum.nim-lang.org/t/9494 |
15:13:01 | * | tiorock joined #nim |
15:13:01 | * | tiorock quit (Changing host) |
15:13:01 | * | tiorock joined #nim |
15:13:01 | * | rockcavera is now known as Guest2309 |
15:13:01 | * | Guest2309 quit (Killed (sodium.libera.chat (Nickname regained by services))) |
15:13:01 | * | tiorock is now known as rockcavera |
15:22:53 | FromDiscord | <Mrcool> sent a code paste, see https://play.nim-lang.org/#ix=4bBt |
15:23:40 | FromDiscord | <Mrcool> or it seems like its hitting the fatal pragam |
15:24:11 | FromDiscord | <Mrcool> (edit) "https://play.nim-lang.org/#ix=4bBt" => "https://play.nim-lang.org/#ix=4bBv" |
15:24:21 | FromDiscord | <hotdog> In reply to @Mrcool "nimsuggest fails silently on": Are you running nimsuggest with backend:js? |
15:24:55 | FromDiscord | <Mrcool> nimsuggest takes backend as arg? I tried --backend:js it doesn't seem to do anything |
15:37:55 | FromDiscord | <Mrcool> actually it seems its hitting the pragma indeed https://media.discordapp.net/attachments/371759389889003532/1024344142471503992/unknown.png |
15:41:08 | * | ehmry quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
15:42:31 | FromDiscord | <hotdog> In reply to @Mrcool "nimsuggest takes backend as": It picks up config.nims etc |
15:42:47 | FromDiscord | <hotdog> Try putting config.nims in the folder with --backend:js inside |
15:44:39 | * | ehmry joined #nim |
15:47:03 | FromDiscord | <Mrcool> same thing https://media.discordapp.net/attachments/371759389889003532/1024346439100420226/unknown.png |
15:54:24 | FromDiscord | <EyeCon> Side question: you aliased `cat` to `bat`? |
15:55:21 | FromDiscord | <hotdog> In reply to @Mrcool "same thing": Hmmm |
15:55:24 | FromDiscord | <Mrcool> yes xD |
15:55:30 | FromDiscord | <Mrcool> and catc to /usr/bin/cat |
15:55:45 | FromDiscord | <hotdog> Looks like it works if you call with -d:js to define the symbol |
15:56:15 | FromDiscord | <hotdog> So I guess nimsuggest is perhaps picking up the backend correctly but not defining js |
15:57:53 | FromDiscord | <Mrcool> I get another error with -d:js https://media.discordapp.net/attachments/371759389889003532/1024349166782132358/unknown.png |
15:58:46 | FromDiscord | <hotdog> In reply to @Mrcool "I get another error": I guess the manual define is confusing things |
15:58:59 | FromDiscord | <hotdog> Seems like a bug though, probably best to open an issue on github |
15:59:06 | FromDiscord | <Mrcool> sure |
16:13:43 | FromDiscord | <Mrcool> This explains why I have these type of errors , I guess nimuggest don't know of js backend https://media.discordapp.net/attachments/371759389889003532/1024353148367802469/unknown.png |
16:18:28 | NimEventer | New Nimble package! geometrymath - Linear algebra library for computer graphics applications, see https://github.com/can-lehmann/geometrymath |
16:25:39 | * | kenran quit (Remote host closed the connection) |
16:25:55 | FromDiscord | <hotdog> In reply to @Mrcool "This explains why I": It's weird because it definitely makes a difference for me with my projects when I set the backend in a config, so it is doing _something_ |
16:27:03 | FromDiscord | <PyryTheBurger> sent a code paste, see https://play.nim-lang.org/#ix=4bBZ |
16:28:09 | FromDiscord | <hotdog> In reply to @hotdog "It's weird because it": I just tried turning it off on the file I have open at the moment, nimsuggest is 100% picking it up |
16:28:45 | FromDiscord | <hotdog> Perhaps the lsp is doing something in between |
16:29:39 | FromDiscord | <hotdog> In reply to @PyryTheBurger "when i have something": req.T |
16:31:42 | FromDiscord | <Bung> dont know where you will use that type |
16:32:01 | FromDiscord | <Bung> from that line , u dont even use it |
16:34:28 | FromDiscord | <Mrcool> In reply to @hotdog "I just tried turning": I'm using nimsuggest directly though |
16:34:34 | FromDiscord | <Mrcool> (edit) "In reply to @hotdog "I just tried turning": I'm using nimsuggest directly though ... " added "and it has the same errors" |
16:34:59 | FromDiscord | <hotdog> In reply to @Mrcool "I'm using nimsuggest directly": Sure, I'm just saying that it's not the case that nimsuggest is unaware of the js backend |
16:40:29 | FromDiscord | <PyryTheBurger> sent a code paste, see https://play.nim-lang.org/#ix=4bC4 |
16:42:53 | FromDiscord | <hotdog> In reply to @PyryTheBurger "why is this returning": `r.T.typeof is int` |
16:43:28 | FromDiscord | <Rika> You don’t need the type of part |
16:43:33 | FromDiscord | <Rika> T is the type |
17:01:44 | FromDiscord | <Mrcool> I feel like the error output of nim should be inversed I always have to scroll to see whats wrong |
17:05:19 | * | vicecea quit (Remote host closed the connection) |
17:05:49 | * | vicecea joined #nim |
17:07:31 | FromDiscord | <PyryTheBurger> sent a code paste, see https://play.nim-lang.org/#ix=4bCb |
17:07:44 | FromDiscord | <hotdog> In reply to @PyryTheBurger "why does this return": Change `==` to `is` |
17:08:13 | FromDiscord | <PyryTheBurger> woah |
17:09:02 | FromDiscord | <exelotl> In reply to @Mrcool "I feel like the": `--spellSuggest:0` helps... maybe `--showAllMismatches:off` too but I haven't tried it |
17:09:11 | FromDiscord | <hotdog> @PyryTheBurger https://nim-lang.org/docs/manual.html#generics-is-operator |
17:11:45 | FromDiscord | <Mrcool> how do I translatet this `/\s+/` , `newRegExp("\s+")` fails |
17:11:53 | FromDiscord | <Mrcool> (edit) "translatet" => "translate" | "translatethis ... `/\s+/`" added "js" |
17:11:58 | FromDiscord | <Mrcool> (edit) "how do I translate this js ... `/\s+/`" added "regex" |
17:13:06 | FromDiscord | <Mrcool> In reply to @exelotl "`--spellSuggest:0` helps... maybe `--showAllMismatc": I just noticed that its nimble is the one thats adding stacktraces |
17:13:24 | FromDiscord | <PyryTheBurger> sent a code paste, see https://play.nim-lang.org/#ix=4bCe |
17:13:29 | FromDiscord | <PyryTheBurger> like loop through them |
17:14:00 | FromDiscord | <Mrcool> can I turn off all this extra nimble stuf https://media.discordapp.net/attachments/371759389889003532/1024368323334516856/unknown.png |
17:14:02 | FromDiscord | <Mrcool> (edit) "stuf" => "stuff" |
17:14:50 | FromDiscord | <PyryTheBurger> sent a code paste, see https://play.nim-lang.org/#ix=4bCg |
17:14:53 | FromDiscord | <dallas_bruno> Click and thank me later ↵👇👇👇👇👇👇↵http://t.me/Stevecoldham001 |
17:16:37 | FromDiscord | <can.l> Since Nim 1.6.8 seems to have --styleCheck:hint turned on by default, I assume that it was decided to remove style insensitivity. I started to convert my project from using snake_case to using camelCase manually. This is however quite time consuming. Is there a tool which automatically applies the suggested style changes? |
17:24:02 | FromDiscord | <Mrcool> what that was removed, that was the funniest thing though |
17:34:15 | FromDiscord | <Mrcool> it seems I can't turn off exec stacktraces <https://github.com/nim-lang/Nim/blob/devel/lib/system/nimscript.nim#L264> and rawExec is not public so I can't make my own wrapper, any suggestions here? |
17:34:41 | FromDiscord | <flywind> In reply to @can.l "Since Nim 1.6.8 seems": Fixed on devel, should have been backported https://github.com/nim-lang/Nim/pull/20398 |
17:36:34 | FromDiscord | <Mrcool> In reply to @Mrcool "how do I translate": "\\s+" |
17:36:38 | FromDiscord | <Mrcool> (edit) ""\\s+"" => ""\s+"" |
17:36:42 | FromDiscord | <Mrcool> (edit) ""\s+"" => ""\\\s+"" |
17:36:45 | FromDiscord | <Mrcool> (edit) "In reply to @Mrcool "how do I translate": "\\\s+" ... " added "works" |
17:36:55 | * | LuxuryMode joined #nim |
17:38:00 | FromDiscord | <Mrcool> does nim have some pattern matching |
17:38:17 | FromDiscord | <Mrcool> as in something like let [a,b] = @[1,2] |
17:38:47 | FromDiscord | <flywind> There is one in fusion https://nim-lang.org/blog/2021/03/10/fusion-and-pattern-matching.html |
17:41:04 | FromDiscord | <Horizon [She/Her]> https://github.com/jzimmerman/langcc looks neat... Wonder if it could be used with Nim at all? |
17:47:54 | FromDiscord | <Mrcool> can I make this work ` var data: Table[string, string] = {}.toTable` |
17:47:59 | FromDiscord | <can.l> In reply to @flywind "Fixed on devel, should": I tried both devel and stable, and hints are enabled on both. --styleCheck:off also does not seem to work for me. |
17:48:16 | FromDiscord | <Mrcool> it seems to only compile if add random fields {"a":"b"}.toTable |
17:48:22 | FromDiscord | <can.l> (edit) removed "--styleCheck:off also does not seem to work for me." |
17:48:45 | FromDiscord | <flywind> In reply to @can.l "I tried both devel": Latest devel? |
17:49:16 | FromDiscord | <can.l> Correction: --styleCheck:off also does not seem to work on stable, but it works on devel. |
17:49:50 | FromDiscord | <can.l> In reply to @flywind "Latest devel?": 805186809c0591bb24ff30b6ce48b60527a7a9e8 |
17:49:59 | FromDiscord | <can.l> ^ Commit hash |
17:50:15 | FromDiscord | <can.l> (edit) removed "does" |
17:50:22 | FromDiscord | <can.l> (edit) "also" => "does" |
17:50:36 | FromDiscord | <flywind> May I have a test case showing the hints are enabled by default? |
17:51:06 | FromDiscord | <EyeCon> In reply to @PyryTheBurger "how would i check": https://nim-lang.org/docs/typetraits.html#genericParams.t%2Ctypedesc |
17:51:34 | FromDiscord | <can.l> In reply to @flywind "May I have a": `let a_b = 1` |
17:51:47 | FromDiscord | <EyeCon> Then: https://nim-lang.org/docs/iterators.html#fieldPairs.i%2CS%2CT I guess |
17:52:22 | FromDiscord | <flywind> In reply to @can.l "`let a_b = 1`": Cannot reproduce on windows. |
17:52:51 | FromDiscord | <flywind> https://media.discordapp.net/attachments/371759389889003532/1024378095471431881/unknown.png |
17:54:23 | FromDiscord | <Mrcool> In reply to @Mrcool "can I make this": initTable works |
17:57:05 | FromDiscord | <flywind> In reply to @flywind "Cannot reproduce on windows.": Not on Linux too |
17:57:26 | FromDiscord | <can.l> In reply to @flywind "": Ah, sorry. I think I mixed up the versions. It is still broken on stable though. https://media.discordapp.net/attachments/371759389889003532/1024379249760665680/unknown.png |
17:57:56 | FromDiscord | <flywind> Yeah, the PR should have been backported to 1.6.8. |
18:00:24 | FromDiscord | <PyryTheBurger> sent a code paste, see https://paste.rs/w6h |
18:00:42 | FromDiscord | <EyeCon> What did you do? Please paste the code. |
18:01:08 | FromDiscord | <PyryTheBurger> sent a code paste, see https://play.nim-lang.org/#ix=4bCA |
18:02:27 | FromDiscord | <PyryTheBurger> sent a code paste, see https://play.nim-lang.org/#ix=4bCB |
18:06:02 | FromDiscord | <Horizon [She/Her]> Is there a nim equivalent to Python's `ascii`? |
18:06:43 | FromDiscord | <Horizon [She/Her]> not ascii |
18:06:45 | FromDiscord | <Horizon [She/Her]> `title` |
18:07:19 | FromDiscord | <Horizon [She/Her]> So `"hElLO wORLD!".title()` in Python becomes `"Hello World!"` |
18:09:15 | FromDiscord | <Horizon [She/Her]> Ah it's in the unicode module as `title` apparently |
18:09:20 | FromDiscord | <Horizon [She/Her]> That was... Tricky to find |
18:09:21 | FromDiscord | <EyeCon> sent a code paste, see https://play.nim-lang.org/#ix=4bCE |
18:10:34 | * | jmdaemon joined #nim |
18:13:21 | FromDiscord | <EyeCon> Additionally, I tried some things, but it seems that a typedesc tuple as returned by the genericParams can't be iterated over |
18:13:29 | FromDiscord | <EyeCon> Correction: indexed |
18:14:40 | FromDiscord | <EyeCon> sent a code paste, see https://play.nim-lang.org/#ix=4bCI |
18:21:47 | FromDiscord | <EyeCon> Might be related to https://github.com/nim-lang/Nim/issues/19334 even |
18:39:04 | * | dnh joined #nim |
18:57:03 | * | krux02_ joined #nim |
19:06:14 | * | tiorock joined #nim |
19:06:14 | * | tiorock quit (Changing host) |
19:06:14 | * | tiorock joined #nim |
19:06:14 | * | rockcavera quit (Killed (tantalum.libera.chat (Nickname regained by services))) |
19:06:14 | * | tiorock is now known as rockcavera |
19:15:14 | FromDiscord | <ngangngong> Hi there, is labeled block in nim same as GOTO? which Djikstra said was harmful? |
19:17:30 | FromDiscord | <demotomohiro> No. labeled block just create a new scope and you can do `break labelname`.↵But you cannot do `goto labelname` from arbitrary line. |
19:18:26 | FromDiscord | <demotomohiro> https://nim-lang.org/docs/manual.html#statements-and-expressions-block-statement |
19:19:20 | FromDiscord | <ngangngong> is there any other usecase than just `break` it? |
19:20:09 | FromDiscord | <ngangngong> (edit) "is there any other usecase than just ... `break`loop?" added "to" | "it?" => "loop?" |
19:32:57 | FromDiscord | <4zv4l> `let fn = findAll(request.body, re"name=\"(.)\"")` |
19:33:08 | FromDiscord | <4zv4l> how do I esquape " in regex ? |
19:33:11 | FromDiscord | <4zv4l> escape |
19:45:48 | FromDiscord | <4zv4l> or how can I parse `form-data` |
19:45:57 | FromDiscord | <4zv4l> to get a hashmap |
19:53:45 | FromDiscord | <Horizon [She/Her]> Question, why should I use Karax? I want to make a website and make it look decent but i don't understand it at all tbh |
19:57:14 | FromDiscord | <ngangngong> In reply to @Event Horizon "Question, why should I": Karax is for SPA usecase, the web UI is all generated by javascript. For traditional approach u can just serve html files using nim http server |
19:57:15 | FromDiscord | <4zv4l> In reply to @4zv4l "or how can I": I don't find any function to do this that's insane |
19:58:08 | FromDiscord | <Horizon [She/Her]> In reply to @ngangngong "Karax is for SPA": SPA? Also I'm working on a shopping website for food products |
20:01:32 | FromDiscord | <ngangngong> sent a code paste, see https://play.nim-lang.org/#ix=4bDg |
20:01:38 | FromDiscord | <Horizon [She/Her]> Ah |
20:01:52 | FromDiscord | <ngangngong> (edit) "https://play.nim-lang.org/#ix=4bDg" => "https://play.nim-lang.org/#ix=4bDh" |
20:02:01 | FromDiscord | <ngangngong> (edit) "https://play.nim-lang.org/#ix=4bDh" => "https://play.nim-lang.org/#ix=4bDi" |
20:05:05 | FromDiscord | <ngangngong> You might use Jester instead, https://github.com/dom96/jester |
20:06:38 | FromDiscord | <ngangngong> (edit) "use" => "looking for" | "instead, https://github.com/dom96/jester" => "https://github.com/dom96/jester, I presume." |
20:08:01 | FromDiscord | <Horizon [She/Her]> I'm using Prologue for the server itself |
20:08:18 | FromDiscord | <ngangngong> Oh the server is done? |
20:08:36 | FromDiscord | <Horizon [She/Her]> I just want to be able to create good-looking html |
20:08:41 | FromDiscord | <ngangngong> oh, I see. |
20:08:45 | FromDiscord | <Horizon [She/Her]> Since I'm clueless on it |
20:10:00 | FromDiscord | <4zv4l> how do I get the 'body' from `{"fname": (fields: {Content-Disposition: form-data; name="fname", name: fname}, body: "Hello")}` ordered table |
20:10:33 | FromDiscord | <Horizon [She/Her]> `table["fname"].body` should work |
20:10:54 | FromDiscord | <4zv4l> why "fname" ? |
20:11:10 | FromDiscord | <ngangngong> so the server is API like RestAPI for instance, hmm. |
20:11:31 | FromDiscord | <Horizon [She/Her]> In reply to @4zv4l "why "fname" ?": Since that's the key it's located in |
20:11:51 | FromDiscord | <4zv4l> body is the key |
20:12:06 | FromDiscord | <4zv4l> {"fname": (), body: "Hello"} |
20:12:13 | FromDiscord | <4zv4l> body is another key |
20:12:25 | FromDiscord | <Horizon [She/Her]> That example is wrong then |
20:12:33 | FromDiscord | <4zv4l> oooh |
20:12:36 | FromDiscord | <4zv4l> I didn't see the ) before body |
20:12:37 | FromDiscord | <4zv4l> damn |
20:12:39 | FromDiscord | <4zv4l> my bad |
20:12:45 | FromDiscord | <4zv4l> thank you xD |
20:12:46 | FromDiscord | <Horizon [She/Her]> Nah dw |
20:12:53 | FromDiscord | <Horizon [She/Her]> No worries xD |
20:12:59 | FromDiscord | <Horizon [She/Her]> In reply to @ngangngong "so the server is": Yup |
20:14:43 | FromDiscord | <ngangngong> good-looking html is just good css I guess? |
20:14:48 | FromDiscord | <ngangngong> (edit) "good-looking html" => "`good-looking html`" |
20:15:47 | FromDiscord | <ngangngong> reactive, or interactive user interfaces is different story. |
20:18:16 | FromDiscord | <Horizon [She/Her]> In reply to @ngangngong "`good-looking html` is just": Yeah I don't understand that rip, tried html and css but can't wrap my head around it tbh |
20:18:26 | FromDiscord | <Horizon [She/Her]> Since it should also work for mobile too |
20:19:00 | FromDiscord | <Horizon [She/Her]> In reply to @ngangngong "reactive, or interactive user": I think as long as it can scroll and click a few buttons, it's fine |
20:19:35 | FromDiscord | <Horizon [She/Her]> Since it should be able to add products to cart, open the payment screen, scroll through products, and that's it |
20:20:23 | FromDiscord | <exelotl> 99% of the time you don't need an SPA, it's trendy but I don't think it's a good idea for most sites |
20:20:39 | FromDiscord | <Horizon [She/Her]> Fair |
20:28:23 | FromDiscord | <ngangngong> Karax. Single page applications for Nim. the description should change to 'A nim library for building web user interfaces'. I tried it, it's Reactjs siblings. the design decision mostly same. |
20:31:01 | FromDiscord | <ngangngong> Well, it's up to you to choose which UI Lib, but I like TEA(The Elm Architecture) or Svelte design approach, which I currently can't find in nim? |
20:36:12 | FromDiscord | <leorize> karax does have a "reactive" experiment that's similar to svelte, but that got axed due to macros limitations iirc |
20:42:24 | FromDiscord | <Horizon [She/Her]> Hm... I may just use Svelte itself maybe |
20:43:20 | FromDiscord | <Horizon [She/Her]> I wonder if it's feasible to wrap Svelte in Nim or if there's no point |
20:45:37 | NimEventer | New post on r/nim by PeterHickman: Cross compiling on macos, see https://reddit.com/r/nim/comments/xps51z/cross_compiling_on_macos/ |
20:46:06 | FromDiscord | <Binary Trading Investment> sent a long message, see http://ix.io/4bDt |
20:46:13 | FromDiscord | <Binary Trading Investment> sent a long message, see http://ix.io/4aGV |
20:47:45 | FromDiscord | <Horizon [She/Her]> In reply to @Binary Trading Investment "Do you have a": Sigh... |
20:48:29 | FromDiscord | <Horizon [She/Her]> <@&371760044473319454> |
20:49:36 | FromDiscord | <leorize> I once again pitch the idea of setting up https://github.com/matrix-org/mjolnir for Nim rooms |
20:50:31 | FromDiscord | <Elegantbeef> Could do that or could just manually moderate 20+ messages a day |
20:50:33 | FromDiscord | <Elegantbeef> Matrix r bad |
20:52:58 | FromDiscord | <ngangngong> lmao, Prologue is actually a web framework? I thought it was Prolog language. @Horizon [She/Her] have u checked out the blog example of Prologue? https://github.com/planety/prologue/tree/devel/examples/blog |
20:54:48 | FromDiscord | <Horizon [She/Her]> Yeah it is lmao |
20:54:53 | FromDiscord | <ngangngong> there, Karax in there is act just a templating languages/engine, just like EJS/Handlebars/Pug/Mustache, but the dom is written in nim, not html/jsx. |
20:55:08 | FromDiscord | <Horizon [She/Her]> In reply to @ngangngong "lmao, Prologue is actually": I didn't see how it could be of use to me |
20:55:48 | FromDiscord | <Horizon [She/Her]> In reply to @ngangngong "there, Karax in there": Hm, but how does that help when it comes to making the entire design look good? |
20:56:00 | FromDiscord | <Horizon [She/Her]> Since Karax only generates html |
20:56:32 | FromDiscord | <ngangngong> are u prefer component or class based css? |
20:56:42 | FromDiscord | <leorize> if you want good design, either hire a designer or learn how to do it yourself \:p |
20:57:05 | FromDiscord | <ngangngong> well u can add class to that html, which used as a css selector |
20:58:11 | FromDiscord | <ngangngong> if u can't do design, prefer component based, like bootstrap/bulma, else tools like tailwind. |
20:58:18 | FromDiscord | <Horizon [She/Her]> In reply to @ngangngong "are u prefer component": I don't know how they work at all so uh, either? |
20:58:21 | FromDiscord | <ngangngong> (edit) "else" => "else," |
20:58:25 | FromDiscord | <Horizon [She/Her]> In reply to @ngangngong "if u can't do": Ah alright, thanks! |
20:58:50 | FromDiscord | <Horizon [She/Her]> In reply to @leorize "if you want good": Don't want to hire someone for an idea that may not even come to fruition so learning it is lmao |
20:58:56 | FromDiscord | <leorize> it's better to design using a dedicated tool before implementing it btw, to eliminate design issues that arise from "too hard to do" |
21:00:09 | FromDiscord | <Horizon [She/Her]> What dedicated tool do you mean? |
21:00:11 | FromDiscord | <ngangngong> so ugh, mock design in ~~figma~~ first preferred |
21:00:20 | FromDiscord | <ngangngong> (edit) "first preferred" => "first, preferred." |
21:00:22 | FromDiscord | <Horizon [She/Her]> Ah |
21:00:50 | FromDiscord | <leorize> there should be some free online courses around, designing is very different from coding so you gotta be careful |
21:01:07 | FromDiscord | <ngangngong> agreed. |
21:01:18 | FromDiscord | <leorize> figma is the industry standard rn |
21:01:43 | FromDiscord | <Horizon [She/Her]> Ah alright, thank you Leorize and Ngangngong |
21:01:53 | FromDiscord | <leorize> penpot if you want OSS tool, though I've never used it myself |
21:04:32 | * | kenran joined #nim |
21:04:53 | * | kenran quit (Remote host closed the connection) |
21:06:13 | FromDiscord | <leorize> btw, unless you /really/ want to do it in Nim, frontend web stuff is best coded in JS/TS, just for having established tooling |
21:07:27 | FromDiscord | <ngangngong> can't agree more |
21:08:29 | FromDiscord | <Horizon [She/Her]> Hm fair enough, just dislike them both a lot sadly but eh |
21:10:23 | FromDiscord | <leorize> alternatively you can bring those tooling to Nim, but, uh, a lot of pain ensues |
21:10:47 | FromDiscord | <leorize> and probably shouldn't be attempted if you're new to the subject \:p |
21:13:35 | * | dnh quit (Quit: Textual IRC Client: www.textualapp.com) |
21:16:03 | FromDiscord | <Schelz> hi, can somebody provide me a documentation about "Using statement" and how to implement it in a template method ? I couldn't find nothing about "Using statement". |
21:23:00 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/manual.html#statements-and-expressions-using-statement |
21:24:10 | FromDiscord | <ngangngong> In reply to @Schelz "hi, can somebody provide": `Note that using is not applied for template since the untyped template parameters default to the type system.untyped.` |
21:25:16 | FromDiscord | <Schelz> uh, thx I have seen the official post on the nim webpage but I hoped I could find smth more interesting... |
21:27:08 | FromDiscord | <Elegantbeef> For the opinion no one asked for, using is bleh |
21:27:16 | FromDiscord | <Horizon [She/Her]> In reply to @leorize "and probably shouldn't be": Fair lol |
21:29:05 | FromDiscord | <ngangngong> I actually don't know what using is, is it come from python or c#? |
21:29:27 | FromDiscord | <ngangngong> (edit) "I actually don't know what using is, is it come from python or c#? ... " added "well it's good that nim support it for easy migration." |
21:29:42 | FromDiscord | <ngangngong> (edit) "using" => "`using`" |
21:30:09 | FromDiscord | <ngangngong> (edit) "I actually don't know what `using` is, is it come from python or c#? well it's good that nim support it for easy migration. ... " added "Are these bots on irc or matrix?" |
21:31:09 | FromDiscord | <Elegantbeef> It's just a way to reduce typing for parameters |
21:31:15 | FromDiscord | <Elegantbeef> It's relatively unreadable to me though |
21:31:36 | FromDiscord | <Elegantbeef> I'm a matrix user |
21:31:42 | FromDiscord | <Elegantbeef> But we now outnumber those pesky single media users |
21:31:42 | FromDiscord | <Elegantbeef> There is a irc bridge aswell |
21:35:53 | FromDiscord | <leorize> irc ppl have `[IRC]` tag on them, matrix otherwise |
21:52:47 | FromDiscord | <Patitotective> In reply to @Elegantbeef "I'm a matrix user": hes not |
21:52:48 | FromDiscord | <Patitotective> hes a bot |
22:06:42 | * | LuxuryMode quit (Quit: Connection closed for inactivity) |
22:13:56 | * | arkurious quit (Quit: Leaving) |
22:19:34 | * | krux02_ quit (Remote host closed the connection) |
22:41:31 | FromDiscord | <Iliketwertles> can i convert the string `color` into a color that terminal can use? https://media.discordapp.net/attachments/371759389889003532/1024450746088947714/screenshot_2022-09-27-184052.png |
22:41:44 | FromDiscord | <Iliketwertles> or maybe use something other than ansiForegroundColorCode? |
22:41:46 | FromDiscord | <czgchsz> sent a code paste, see https://paste.rs/nkc |
22:42:03 | FromDiscord | <Elegantbeef> `parseEnum`↵(@Iliketwertles) |
22:43:04 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4bE2 |
22:43:11 | FromDiscord | <Elegantbeef> `x.fields` returns a field, not an index |
22:43:28 | FromDiscord | <Patitotective> In reply to @czgchsz "Hello. I am very": thats not list of tuples (list are sequences in nim) you want `@[(name: "John", age: 12, ...)]`↵and you dont need `.fields` |
22:43:44 | FromDiscord | <Iliketwertles> sent a code paste, see https://play.nim-lang.org/#ix=4bE3 |
22:43:45 | FromDiscord | <czgchsz> sent a code paste, see https://paste.rs/PrK |
22:43:47 | FromDiscord | <Elegantbeef> Did you read the docs? |
22:43:56 | FromDiscord | <Iliketwertles> no i legit just put it in the code |
22:44:00 | FromDiscord | <czgchsz> Oh, I see, thank you. |
22:44:00 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/strutils.html#parseEnum%2Cstring |
22:44:12 | FromDiscord | <Elegantbeef> When someone tells you a function it's a good idea to read the docs |
22:49:01 | FromDiscord | <Patitotective> In reply to @Elegantbeef "When someone tells you": whats a function :p |
22:49:28 | FromDiscord | <Elegantbeef> czgchsz I will not that `items` is the iterator you use to iterate the immutable value of a sequence(and defaultly called when you do `for x in y`), and `mitems` is used to iterate for the mutable variant |
22:50:20 | FromDiscord | <Iliketwertles> im lost (again:lmao3D:) |
22:51:17 | FromDiscord | <czgchsz> I got it now. The lack of [] confused me. It all works now as intended. Thanks you! |
22:53:25 | FromDiscord | <czgchsz> I mean, I'm using `case field.name`, I do change the age now for particular names, and I do display them for other specific names, etc. so it all worked out.I have not read the docs, I only have a little bit of experience with Nim back from years ago (so I have forgotten most of it, of course). I will go through the docs after I woke up as I am heavily sleep deprived and mixing 3 languages right now. \:D |
22:53:53 | FromDiscord | <Elegantbeef> A pure procedure↵(@Patitotective) |
22:54:20 | FromDiscord | <Patitotective> In reply to @Elegantbeef "A pure procedure (<@762008715162419261>)": {.noSideEffects.} |
22:54:35 | FromDiscord | <Elegantbeef> What's your point |
22:56:36 | FromDiscord | <Iliketwertles> In reply to @Elegantbeef "`parseEnum` (<@548965392832528395>)": i dont even see how this could help me, im getting command line args that would be like "blue" and need to make it fgBlue for example |
22:56:51 | FromDiscord | <Elegantbeef> .... |
22:57:03 | FromDiscord | <Elegantbeef> `parseEnum[ForeGroundColor]("fg" & color)` |
22:57:11 | FromDiscord | <Iliketwertles> but not the string fgBlue the color |
22:57:17 | FromDiscord | <Patitotective> ... |
22:58:19 | FromDiscord | <Elegantbeef> Yes |
22:58:20 | FromDiscord | <Elegantbeef> That's what parsing is for |
23:02:44 | FromDiscord | <Iliketwertles> brain small |
23:02:47 | FromDiscord | <Iliketwertles> thank |
23:03:44 | FromDiscord | <Iliketwertles> time to make some sort of rainbow thing so every letter is a diff color, i can loop through char in string cant i? https://media.discordapp.net/attachments/371759389889003532/1024456334298595418/screenshot_2022-09-27-190104.png |
23:07:49 | FromDiscord | <Patitotective> In reply to @Iliketwertles "time to make some": yes you can |
23:09:24 | FromDiscord | <czgchsz> sent a code paste, see https://play.nim-lang.org/#ix=4bEa |
23:14:31 | FromDiscord | <Iliketwertles> getting somewhere https://media.discordapp.net/attachments/371759389889003532/1024459046083891300/screenshot_2022-09-27-191418.png |
23:14:58 | FromDiscord | <Iliketwertles> just need it to not echo the char every time a valid color is there, but ik why its doing it |
23:15:19 | FromDiscord | <Patitotective> In reply to @Iliketwertles "just need it to": echo always adds a new line at the end |
23:15:37 | FromDiscord | <Iliketwertles> no i mean like echoing t 6 times |
23:15:42 | FromDiscord | <Iliketwertles> instead of once |
23:17:06 | FromDiscord | <Iliketwertles> its cause im using 2 for loops but idk how else to go through all the chars and colors https://media.discordapp.net/attachments/371759389889003532/1024459679272804412/screenshot_2022-09-27-191630.png |
23:22:00 | FromDiscord | <Elegantbeef> Shit spoon feeding commited |
23:22:06 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4bEb |
23:29:00 | FromDiscord | <Iliketwertles> i appreciate it |
23:29:21 | FromDiscord | <John Fred> sent a long message, see http://ix.io/4aGV |
23:31:44 | FromDiscord | <Prestige> <@&371760044473319454> |
23:31:52 | FromDiscord | <Prestige> Is there no way we can like, autoban this stuff |
23:32:25 | FromDiscord | <Girvo> @Prestige There is, but someone needs to host the server for it IIRC |
23:33:25 | FromDiscord | <Girvo> https://github.com/matrix-org/mjolnir is one of the things I've seen |
23:33:25 | FromDiscord | <baalajimaestro> So coin bots are making it even on matrix |
23:34:06 | FromDiscord | <Girvo> Yeah its matrix they're using to do it. It's a shame, one of the downsides of such a nice distributed protocol. But if someone can setup/run mjolnir or similar, we can nip it in the bud (or at least reduce it a lot) |
23:34:47 | FromDiscord | <Prestige> We also need better hosting for the playground, it's down again I believe |
23:35:22 | FromDiscord | <Girvo> Damn. Who hosts it currently? I'm sure I could convince work to help pay for better hosting |
23:35:29 | FromDiscord | <Prestige> PMunch |
23:40:16 | FromDiscord | <baalajimaestro> I have enough compute space to hold it, but we do need the dns of the old one |
23:44:03 | FromDiscord | <Yardanico> In reply to @Girvo "Damn. Who hosts it": it's hosted on the digitalocean-provided VPSes AFAIK, but PMunch has been managing it, yeah. I think he's busy with his work right now |
23:48:35 | FromDiscord | <Iliketwertles> error handling looks very similer to python, i like that |
23:55:04 | FromDiscord | <Iliketwertles> i can pipe stuff into nim by using stdin?↵(am i reading that correctly online?) |
23:56:16 | FromDiscord | <Patitotective> In reply to @Iliketwertles "i can pipe stuff": yea |