00:06:23 | * | def- quit (Quit: -) |
00:06:33 | * | def- joined #nim |
00:07:56 | * | theelous3 joined #nim |
00:11:07 | * | ptdel joined #nim |
00:15:06 | * | theelous3 quit (Ping timeout: 268 seconds) |
00:19:03 | * | chemist69 quit (Ping timeout: 245 seconds) |
00:21:18 | * | nixfreak quit (Read error: Connection reset by peer) |
00:26:54 | FromGitter | <zetashift> I will do that thanks for help :D |
00:45:01 | * | tobbez quit (Quit: Lost terminal) |
00:53:03 | * | Trustable quit (Remote host closed the connection) |
01:04:35 | * | arecaceae quit (Remote host closed the connection) |
01:04:58 | * | arecaceae joined #nim |
01:14:47 | * | ftsf joined #nim |
01:20:07 | * | PMunch quit (Quit: Leaving) |
01:57:21 | shashlick | @zetashift - here's a working wrapper for https://github.com/orx/orx using nimterop - http://ix.io/28Lv/nim |
01:57:33 | shashlick | sorry, want to make it easier to find when i search back on google |
01:57:48 | shashlick | some stuff is stubbed out and should be declared properly if you need it |
02:04:39 | * | lritter quit (Quit: Leaving) |
02:05:04 | FromGitter | <deech> When I have `static:` output to the console `nimble` doesn't seem to show it, is it logged somewhere? |
02:24:17 | shashlick | Try verbose |
02:30:06 | FromGitter | <deech> Doesn't work. |
02:35:56 | shashlick | Using nimble build? |
02:37:37 | FromGitter | <deech> Yep |
02:47:51 | * | icebattle quit (Ping timeout: 268 seconds) |
02:56:39 | leorize | --debug |
02:57:01 | leorize | that's the only way I ever get nimble to show anything |
02:59:00 | FromGitter | <deech> That worked great. Thanks! |
03:16:33 | * | muffindrake quit (Quit: muffindrake) |
03:18:08 | * | muffindrake joined #nim |
03:21:43 | * | leorize quit (Ping timeout: 240 seconds) |
03:25:26 | * | leorize joined #nim |
03:32:03 | * | rockcavera quit (Remote host closed the connection) |
03:38:35 | * | muffindrake1 joined #nim |
03:38:51 | * | muffindrake1 quit (Client Quit) |
03:39:04 | * | muffindrake1 joined #nim |
03:41:53 | * | muffindrake quit (Ping timeout: 272 seconds) |
03:44:15 | * | muffindrake1 is now known as muffindrake |
04:28:02 | FromDiscord_ | <Elegant Beef> A uint is much like int in that it depends on system arch? |
04:29:04 | * | arecaceae quit (Remote host closed the connection) |
04:29:22 | * | arecaceae joined #nim |
04:36:09 | leorize | yes |
04:38:26 | FromDiscord_ | <Elegant Beef> Also is it just me that finds that `Filemode.fmReadWrite`, clears the files? |
04:38:41 | FromDiscord_ | <Elegant Beef> Also is it just me that finds that `Filemode.fmReadWrite`, clears the file annoying? |
04:38:48 | * | leorize_ joined #nim |
04:38:49 | FromDiscord_ | <Elegant Beef> It's so annoying that it clears the file |
04:39:27 | * | leorize is now known as Guest62666 |
04:39:27 | * | leorize_ is now known as leorize |
04:40:06 | leorize | that has been the case for a long long time now with almost all languages :P |
04:40:26 | leorize | use fmReadWriteExisting to not clear the file |
04:40:32 | FromDiscord_ | <Elegant Beef> Almost every other language it's much more explicit, atleast in my knowledge |
04:40:40 | FromDiscord_ | <Elegant Beef> read/write doesnt scream clear to me |
04:40:43 | * | Guest62666 quit (Ping timeout: 240 seconds) |
04:41:56 | leorize | you'll have to bear with it for now |
04:42:08 | leorize | it's a legacy thing that stick around since the beginning |
04:42:22 | FromDiscord_ | <Rika> what's the difference between fmAppend and fmReadWriteExisting? |
04:42:24 | leorize | until nim 2.0 I don't think we can replace the io module with something better :P |
04:42:36 | leorize | Rika: append set the cursor at the end |
04:42:37 | FromDiscord_ | <Elegant Beef> Ah, the `open()` function clearing the file is really weird |
04:42:52 | FromDiscord_ | <Rika> it's the same in python |
04:42:52 | FromDiscord_ | <Elegant Beef> Super counter intuitive imo |
04:43:04 | FromDiscord_ | <Rika> so i think it's just a python concept mistakenly copied into nium |
04:43:06 | FromDiscord_ | <Rika> nim |
04:43:11 | FromDiscord_ | <Elegant Beef> Ok you werent defending it |
04:43:20 | FromDiscord_ | <Elegant Beef> I was going to say "It's the same in language X" isnt a valid defence |
04:44:05 | leorize | io module hasn't got a lot of love since it's creation |
04:44:08 | FromDiscord_ | <Rika> eh i dont like it either |
04:44:25 | FromDiscord_ | <Elegant Beef> I come C# and it's opening is vastly more explicit |
04:44:41 | leorize | but it's now also a crucial module that we can't just swap with something else (yet) :( |
04:45:05 | FromDiscord_ | <Elegant Beef> Well i'll be over there bitching if anyone needs me |
04:45:11 | leorize | I'm planning to make an io module that no longer depends on C stdlib |
04:45:22 | FromDiscord_ | <Elegant Beef> I fought for like 2 minutes going "Why the hell is this file im manually writting to empty" |
04:45:25 | leorize | it'll have saner APIs, but that's a lot of work |
04:45:35 | Tanger | Hey folks, I recently took a dive into macros to write a DSL for something I'm working on. First large-ish kinda program and it's definitely not done as efficiently as it could be. Just wondering if anybody would be keen to review my nim code style (not the code, more the way the code is structured and where I could make the code clearer). https://gitlab.com/fight-for-tangaria/main/blob/25-ecs-system/src/fftpkg/components.nim |
04:46:03 | FromDiscord_ | <Rika> i'll look, but i'm not great at writing clean macros (i've made some insane ones though) |
04:46:29 | FromDiscord_ | <Rika> can you explain how it's used though? is that in the comments/docs |
04:47:17 | FromDiscord_ | <Rika> nvm, it's in the code |
04:47:39 | Tanger | Rika: Yeah, should be in the tests. Thanks man, I appreciate it! Macros are a wily beast |
04:47:54 | leorize | can you make lines shorter? :P |
04:48:37 | leorize | also `baseProps: Option[BasePropertyDefs] = none(BasePropertyDefs)` can be `baseProps = none(BasePropertyDefs)` |
04:49:17 | FromDiscord_ | <Rika> this is a lot of helper procs 👀 |
04:49:42 | FromDiscord_ | <Elegant Beef> Wait... nim requires a leading 0 for floats? |
04:49:45 | FromDiscord_ | <Elegant Beef> Ok that's it |
04:49:53 | FromDiscord_ | <Rika> yeah? |
04:49:56 | FromDiscord_ | <Elegant Beef> I now dislike nim |
04:49:59 | FromDiscord_ | <Rika> ok |
04:49:59 | FromDiscord_ | <Elegant Beef> 😄 |
04:50:06 | FromDiscord_ | <Rika> see you |
04:50:11 | FromDiscord_ | <Rika> thanks for trying it out though |
04:50:20 | FromDiscord_ | <Elegant Beef> Im just joking |
04:50:58 | FromDiscord_ | <Rika> i dont know why no-leading-0 is a thing though |
04:51:05 | FromDiscord_ | <Rika> it's offputting for me |
04:51:17 | * | nsf joined #nim |
04:51:31 | FromDiscord_ | <Elegant Beef> I mostly do math by hand, it gets in the way for multiplication |
04:51:34 | FromDiscord_ | <Elegant Beef> Atleast i did mostly |
04:51:45 | FromDiscord_ | <Elegant Beef> Also it's not needed |
04:51:56 | FromDiscord_ | <Elegant Beef> i dont put x/1 either |
04:52:59 | Tanger | Rika, Yeah, the goal is to cut a lot of them out or move them if they're still necessary. leorize: Yeah, haha, I should change my character width to normal term size and probably expand some statements |
04:53:35 | FromDiscord_ | <Rika> buildPropDef has one hell of a line length |
04:53:56 | FromDiscord_ | <Rika> actually all of the helpers signatures are long asf |
04:55:24 | FromDiscord_ | <Rika> `newIdentNode(str)` can be `str.ident` |
04:55:34 | FromDiscord_ | <Rika> or whatever ufcs style you use |
04:56:05 | Tanger | What would you suggest to shorten these function signatures? I've considered turning the signatures into an actual type def or an object or something similar |
04:56:06 | Tanger | Cool, thanks |
04:56:20 | * | marmotini_ joined #nim |
04:56:52 | FromDiscord_ | <Rika> i usually newline them |
04:57:24 | FromDiscord_ | <Rika> `proc buildInheritedComponentTypeDef(name: NimNode, base: NimNode, props: NimNode`... can be `proc buildInheritedComponentTypeDef(name, base, props: NimNode`... |
04:57:53 | FromDiscord_ | <Rika> basically if you have args beside each other w/ the same type you can omit the ones before the last arg w/ the type |
04:58:06 | Tanger | Oh snap, what a silly bugger, my damn editor is wrapping the lines -_- |
04:59:32 | FromDiscord_ | <Rika> LOL |
05:00:04 | Tanger | Didn't *actually* commit the line breaks I see |
05:00:20 | * | marmotini_ quit (Remote host closed the connection) |
05:00:20 | FromDiscord_ | <Rika> also a `for ... in ...` won't run if the iterable is empty i'm pretty sure, so you can remove L339 |
05:01:59 | FromDiscord_ | <Rika> L237 has a useless comment lol |
05:02:11 | FromDiscord_ | <Rika> wait, not a comment |
05:02:13 | FromDiscord_ | <Rika> disregard |
05:07:32 | FromDiscord_ | <Rika> i'm having some sort of mental block right now so ill call it there, maybe someone else can continue reading the macro |
05:07:57 | Tanger | Rika: All good, thanks once again for that! |
05:31:04 | * | dddddd quit (Remote host closed the connection) |
05:34:28 | * | Romanson joined #nim |
05:49:49 | * | sagax joined #nim |
05:53:10 | * | narimiran joined #nim |
06:23:49 | * | actuallybatman quit (Quit: leaving) |
06:25:25 | * | ptdel quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
07:12:20 | Zevv | To the Battrain! |
07:14:54 | Zevv | https://joellaity.com/2020/01/31/string.html |
07:17:03 | FromDiscord_ | <Rika> great, he uses light green and yellow |
07:17:14 | FromDiscord_ | <Rika> cant even see the difference |
07:17:15 | FromDiscord_ | <Rika> rip |
07:17:26 | Zevv | yeah, but our strings are only green on black, so who cares |
07:19:48 | * | jjido joined #nim |
07:20:03 | * | theelous3 joined #nim |
07:21:17 | * | tefter quit (Quit: WeeChat 2.7) |
07:29:17 | * | Vladar joined #nim |
07:34:22 | * | solitudesf joined #nim |
07:59:45 | * | xet7 joined #nim |
08:00:00 | * | gmpreussner quit (Quit: kthxbye) |
08:02:47 | * | ljoonal quit (Quit: ljoonal.xyz) |
08:04:36 | * | ljoonal joined #nim |
08:04:48 | * | gmpreussner joined #nim |
08:10:27 | * | ljoonal quit (Quit: ljoonal.xyz) |
08:14:47 | * | ljoonal joined #nim |
08:27:27 | * | floppydh joined #nim |
08:33:40 | * | Romanson quit (Quit: Connection closed for inactivity) |
08:38:56 | FromDiscord_ | <Rika> hello, i'm being dumb |
08:39:03 | FromDiscord_ | <Rika> how do i use a code block to assign |
08:41:38 | Tanger | Rika: https://play.nim-lang.org/#ix=28Ml |
08:43:02 | FromDiscord_ | <Rika> tried that but it's giving me an error when i use it, do i need type annotations? |
08:43:42 | FromDiscord_ | <Rika> oh, apparently i commented out my else clause |
08:43:43 | FromDiscord_ | <Rika> lol |
08:45:12 | Tanger | XD |
08:46:49 | FromDiscord_ | <Rika> i hate myself, i made this macro too insane lol |
09:13:44 | Zevv | you must find your inner Zen - breathe the macro - grok the macro - you and the macro must become one |
09:14:38 | * | sunwukong joined #nim |
09:15:09 | * | sunwukong left #nim (#nim) |
09:27:03 | * | Pqzcih5- quit (Ping timeout: 240 seconds) |
09:28:00 | * | Pqzcih5 joined #nim |
09:37:46 | * | xet7 quit (Quit: Leaving) |
09:38:07 | * | xet7 joined #nim |
09:44:03 | * | Pqzcih5 quit (Ping timeout: 240 seconds) |
09:54:11 | FromDiscord_ | <exelotl> You must channel your inner Zevv |
09:54:39 | * | chemist69 joined #nim |
10:00:51 | * | Zevv 's zen just slightly cracked when his Thalys was canceled |
10:05:41 | FromGitter | <alehander92> dont |
10:05:51 | FromGitter | <alehander92> so what happened |
10:05:54 | FromGitter | <alehander92> with arduino |
10:10:42 | * | m|b_ joined #nim |
10:11:14 | Zevv | "happened" |
10:22:42 | FromGitter | <alehander92> what did |
10:22:51 | FromGitter | <alehander92> the arduino people say |
10:22:53 | FromGitter | <alehander92> i remember |
10:22:58 | FromGitter | <alehander92> patching avr-g++ |
10:23:02 | FromGitter | <alehander92> or something like this was the last idea |
10:26:07 | Zevv | the arduino developers are not very vocal |
10:26:24 | Zevv | the forum now started to focus on how Nim was no better then C and that I should not use the String (with a capital S) class on an arduino |
10:26:27 | Zevv | so that was very helpful |
10:26:37 | Zevv | anyway, stuff works, albeit with a hack or two |
10:28:56 | * | chemist69 quit (Quit: WeeChat 2.7) |
10:32:56 | FromGitter | <alehander92> well they are right |
10:33:12 | * | chemist69 joined #nim |
10:33:45 | FromGitter | <alehander92> C is a better fit for arduino just because of its massive popularity/ecosystem,obvious no-gc and popularity |
10:34:01 | FromGitter | <alehander92> but yeah other languages still might be supported |
10:34:10 | FromGitter | <alehander92> good, so i hope to see |
10:34:19 | FromGitter | <alehander92> some projects soon :P |
10:34:24 | FromGitter | <alehander92> :) * |
10:35:58 | dom96 | C is so full of gotchas though |
10:36:18 | FromDiscord_ | <Rika> which Nim usually doesnt have no? |
10:36:23 | dom96 | It might be fine for a small script that blinks lights, but once you want to develop something larger it will be a massive PITA |
10:36:40 | dom96 | Every language has gotchas, but Nim has far fewer than C I'd say |
10:37:18 | FromGitter | <alehander92> yeah but if they have to support one language |
10:37:24 | FromGitter | <alehander92> it makes sense it would be C |
10:37:31 | FromGitter | <alehander92> now multilanguage support is nice |
10:37:41 | FromGitter | <alehander92> but i dont know enough about arduino to talk here |
10:38:39 | FromDiscord_ | <Rika> dom96, which is why i said usually, because you dont know what you dont know lol |
10:42:04 | Zevv | Their argument was that a zero terminated array of chars is better |
10:42:13 | Zevv | ok, then I rest my case |
10:44:34 | FromDiscord_ | <Rika> arent nim strings just wrapping \0 chararrays anyway |
10:49:52 | lqdev[m] | @Rika true. they have a dedicated length field, though. |
10:53:36 | * | Pqzcih5 joined #nim |
10:54:11 | * | narimiran quit (Ping timeout: 265 seconds) |
11:01:26 | FromDiscord_ | <Rika> you should probably signify that in the forum post then |
11:18:12 | * | abm joined #nim |
11:18:13 | * | cgfuh joined #nim |
11:33:00 | * | thomasross_ joined #nim |
11:33:00 | * | thomasross quit (Killed (orwell.freenode.net (Nickname regained by services))) |
11:33:00 | * | thomasross_ is now known as thomasross |
11:39:36 | * | belamenso joined #nim |
11:43:54 | Zevv | nah I dont care at all. i came to ask bout arduino, not to tell about nim |
11:51:26 | * | dddddd joined #nim |
12:00:08 | * | ng0 joined #nim |
12:07:10 | Yardanico | does "zip" module support uncompressing LZMA data? |
12:13:32 | * | rockcavera joined #nim |
12:26:07 | * | nsf quit (Quit: WeeChat 2.7) |
12:27:55 | * | m|b_ quit (Quit: Connection closed for inactivity) |
12:37:02 | * | krux02 joined #nim |
12:47:29 | FromGitter | <alehander92> just realized a loop until a very big value in a for |
12:47:38 | FromGitter | <alehander92> and again started to think |
12:47:50 | FromGitter | <alehander92> do we need int-s, or do we need ranges most of the time |
12:48:01 | FromGitter | <alehander92> is there somebody who uses a lot of range types |
12:48:03 | FromGitter | <alehander92> in nim |
12:49:31 | * | jjido quit (Quit: Connection closed for inactivity) |
12:50:57 | * | narimiran joined #nim |
12:52:22 | * | Trustable joined #nim |
12:54:51 | * | m|b_ joined #nim |
13:09:29 | * | Pqzcih5 quit (Remote host closed the connection) |
13:10:52 | * | nixfreak joined #nim |
13:16:41 | * | Zevv rarely. None of the languages i used befor nim had them, so they're simply not in my mental toolkit until i really need it |
13:18:30 | FromDiscord_ | <sbr> Does someone know how I can serve static assets with Jester in production (Heroku + nginx)? |
13:18:30 | FromDiscord_ | <sbr> My css, js and ico files are in the standard jester folder "public". |
13:18:30 | FromDiscord_ | <sbr> With local development, Jester generates the main html file and also pulls the other static files from the "public" folder. |
13:18:30 | FromDiscord_ | <sbr> In production, I get a 403 forbidden error for everything in the "public" folder. |
13:18:31 | FromDiscord_ | <sbr> Here's the nginx config: https://gitlab.com/sophiabrandt/nimurlshortener/blob/master/services/nginx/default.conf |
13:18:34 | FromDiscord_ | <sbr> Here's the main .nim file (I tried to enable CORS on all routes): https://gitlab.com/sophiabrandt/nimurlshortener/blob/master/services/url-shortener/src/urlShortener.nim |
13:20:52 | * | Vladar quit (Quit: Leaving) |
13:22:53 | * | kungtotte quit (Read error: Connection reset by peer) |
13:23:58 | * | kungtotte joined #nim |
13:32:24 | shashlick | @Yardanico use nimarchive |
13:34:54 | Yardanico | shashlick: thanks |
13:35:25 | Yardanico | it's just that i've used my own small binding for easylzma before, but i'd prefer to use something maintained :) |
13:35:49 | shashlick | Nimarchive is in choosenim |
13:36:13 | shashlick | So the more users, the more stable it can get |
13:38:18 | Yardanico | shashlick: can I uncompress LZMA in memory with it? |
13:38:18 | * | nixfreak quit (Read error: Connection reset by peer) |
13:39:30 | * | nixfreak joined #nim |
13:40:00 | Yardanico | ah nvm it seems like I can |
13:41:34 | * | skellock joined #nim |
13:43:20 | * | marmotini_ joined #nim |
13:43:56 | * | krux02 quit (Remote host closed the connection) |
13:55:06 | * | belamenso quit (Remote host closed the connection) |
14:09:25 | shashlick | libarchive is pretty powerful |
14:09:40 | shashlick | What you using this for |
14:09:52 | Yardanico | shashlick: yeah, I see, I'm mostly done but I can't figure out how to read all data into my buffer :P |
14:10:18 | Yardanico | I probably need archive_read_data but it needs a bufsize argument, but I don't know the size of the uncompressed data |
14:11:11 | Yardanico | shashlick: just for my toy replay reading lib for a game |
14:11:19 | Yardanico | it stores game events in an LZMA stream and I've used easylzma before |
14:13:01 | shashlick | Cool |
14:13:06 | shashlick | What os |
14:13:10 | Yardanico | linux |
14:13:22 | Yardanico | i mean the bindings themselves work just fine |
14:13:31 | Yardanico | I just need to figure out how to do it with libarchive :P |
14:17:19 | Yardanico | ah nvm there's archive_entry_size |
14:19:09 | Yardanico | shashlick: one slight problem is that nimsuggest doesn't seem to pick up nimarchive definitions |
14:19:27 | Yardanico | so in vscode I see "undeclared identifier" for all libarchive stuff even if it compiles fine |
14:22:45 | Araq | https://github.com/nim-lang/Nim/pull/13301 upvote/downvote please |
14:22:46 | disbot | ➥ new `quoted`: outplace version of `addQuoted` |
14:28:26 | Yardanico | shashlick: seems like I figured out how to uncompress raw LZMA data :) |
14:28:29 | Yardanico | do you need it as an example? |
14:30:09 | Yardanico | also is doing "cast[pointer](cstring(data))" correct? when data is a nim string |
14:30:23 | Yardanico | when I want to use string as a buffer so C lib can write something in it |
14:30:31 | Yardanico | (well I mean it works but I don't know if it's correct) |
14:36:32 | Yardanico | although with my usage it seems that using libarchive is much slower than using easylzma directly |
14:46:10 | * | Trustable quit (Remote host closed the connection) |
14:51:57 | * | nullwarp joined #nim |
14:59:47 | * | nixfreak quit (Ping timeout: 252 seconds) |
15:12:28 | FromDiscord_ | <Clyybber> Araq: We should really give sugar.outplace a nice operator |
15:14:40 | shashlick | Yardanico: if you compile at least once, suggestions will start again |
15:14:52 | shashlick | Please share example as well |
15:14:55 | Yardanico | shashlick: I compiled like 30 times already :P |
15:15:05 | Yardanico | even after restarting VSCode it's still the same |
15:15:49 | shashlick | Do you have latest nimterop? |
15:16:04 | Yardanico | shashlick: 0.4.4 |
15:16:34 | Yardanico | nim check doesn't find nimarchive stuff |
15:17:09 | Yardanico | can this be because I'm not in the folder the nim file is in? |
15:17:10 | Yardanico | "Error: unhandled exception: /home/dian/.nimble/pkgs/nimterop-0.4.4/nimterop/build.nim(80, 18) `false` Results not cached - run nim c/cpp at least once" |
15:17:21 | shashlick | Hmm |
15:17:31 | Yardanico | it still doesn't work even if I'm in the same folder, hm |
15:18:08 | Yardanico | shashlick: it doesn't work in one simple file as well |
15:18:21 | shashlick | Strange |
15:18:36 | shashlick | I'll have to check again |
15:19:30 | Yardanico | shashlick: this is how I uncompress LZMA, although I don't know if it's correct or can be improved https://play.nim-lang.org/#ix=28Nt |
15:21:21 | * | ng0_ joined #nim |
15:21:21 | * | ng0_ quit (Changing host) |
15:21:21 | * | ng0_ joined #nim |
15:24:53 | * | ng0 quit (Ping timeout: 272 seconds) |
15:27:55 | * | m|b_ quit (Quit: Connection closed for inactivity) |
15:29:19 | shashlick | Looks like you can ship https://github.com/genotrance/nimarchive/issues/7 |
15:29:21 | disbot | ➥ Add archive writer example in the Readme. ; snippet at 12https://play.nim-lang.org/#ix=28Nv |
15:32:51 | * | floppydh quit (Quit: WeeChat 2.7) |
15:37:18 | * | ng0_ is now known as ng0 |
15:48:53 | * | lritter joined #nim |
15:53:15 | * | icebattle joined #nim |
15:58:56 | * | ng0 quit (Quit: leaving) |
16:01:48 | FromDiscord_ | <Rika> sometimes i wish nim code could also compile into lua, but lua is prolly as hard to convert to as js |
16:03:09 | FromDiscord_ | <demotomohiro> In my old nim code, there are lines like "echo foo;", but Nim don't show any errors or warnings. |
16:03:09 | FromDiscord_ | <demotomohiro> If there are ';' in all end of lines, code looks like C/C++. |
16:03:21 | Araq | fun fact: the jsgen was a luagen once |
16:03:30 | Araq | it never worked though |
16:05:19 | nisstyre | Rika: it's probably not hard to embed a lua interpreter in your nim binary |
16:05:24 | nisstyre | but...why |
16:05:52 | nisstyre | I guess I can see it being useful as a scripting language |
16:05:57 | nisstyre | if you're building a game engine |
16:06:41 | Yardanico | @demotomohiro yes you can use ; in Nim code |
16:07:09 | Yardanico | so you can put multiple statements on one line, and it can also used as a delimiter in proc arguments (and it behaves differently than , in some cases) |
16:08:08 | nisstyre | also in if statements |
16:08:13 | Yardanico | yeah |
16:08:22 | Yardanico | like if (let a = something(); a > 5) |
16:08:34 | * | marmotini_ quit (Remote host closed the connection) |
16:08:36 | nisstyre | I find that a great alternative to the C behaviour of assignment expressions |
16:08:41 | Yardanico | or while (let read = readSomething(); read > 0) |
16:08:44 | nisstyre | much more readable |
16:08:58 | Yardanico | or proc b(x:int):int=(result=5;(if x>5:(if x<3:(if x==0:(echo x;echo x-1)))elif x==0:(echo 0;echo 5)else:return 5)) |
16:08:58 | Yardanico | xD |
16:09:41 | * | a_b_m joined #nim |
16:09:43 | FromGitter | <erhlee-bird> @nisstyre embedding a small LuaJIT has been really helpful for embedded environments where you have binary size constraints and want to provide a "safe" layer above with C/C++ FFI |
16:10:22 | nisstyre | that makes sense |
16:11:45 | FromDiscord_ | <demotomohiro> @Yardanico in addtion to write multiple statements on one line, I can use ; to make code looks like C 🙂 |
16:11:59 | Yardanico | well, do it if you want :) |
16:12:13 | Yardanico | but pls dont |
16:12:24 | FromDiscord_ | <Rika> nisstyre, i mean nim to lua |
16:12:39 | FromDiscord_ | <Rika> i want to code something in nim, but what i'm implementing should be in lua |
16:12:48 | nisstyre | yeah I know, I'm suggesting the alternative would be to embed the interpreter |
16:12:49 | Yardanico | @Rika while that might be useful in some rare cases, I don't really think it's worth the effort of maintaining a backend |
16:12:54 | FromDiscord_ | <Rika> it's for aegisub automation scripting |
16:12:56 | Yardanico | nim even had a PHP backend :P |
16:12:57 | FromDiscord_ | <Rika> i know it isnt |
16:13:03 | FromDiscord_ | <demotomohiro> I removed `;` in my old Nim code so it doesn't looks like C. |
16:13:03 | nisstyre | compiling to Lua, I don't know what the benefits would be |
16:13:15 | FromDiscord_ | <Rika> i'm looking into how to extend aegisub without using lua |
16:13:21 | nisstyre | PHP backend is just monstrous |
16:13:24 | * | abm quit (Ping timeout: 248 seconds) |
16:13:33 | FromDiscord_ | <Rika> god |
16:14:06 | Yardanico | nisstyre: well IIRC Ar*q said he was paid to make it |
16:14:12 | nisstyre | oh, ok |
16:14:14 | Yardanico | and it was mostly unmaintained and got removed around 1.5-2 years ago |
16:14:19 | nisstyre | still, that would horrify me |
16:14:21 | FromDiscord_ | <demotomohiro> When `func` was added to Nim, I asked Araq whether I can use `func` in compiler or standard library code when I write PR for Nim. |
16:14:21 | FromDiscord_ | <demotomohiro> iirc, he said no. But changed mind? |
16:14:21 | FromDiscord_ | <demotomohiro> https://github.com/nim-lang/Nim/pull/13285 |
16:14:22 | disbot | ➥ use func keyword in system |
16:14:37 | Yardanico | @demotomohiro well, it's all about bootstrapping and stuff |
16:14:59 | Yardanico | older compiler version that doesn't know about "func" wouldn't be able to compile code with "func" |
16:15:05 | Yardanico | but csources that we use now support "func" |
16:15:10 | Yardanico | (well, that's my vision on that problem) |
16:16:09 | FromDiscord_ | <demotomohiro> @Yardanico I see |
16:16:40 | Yardanico | it's the same reason of why new nim language features can't be used in the compiler/stdlib right away |
16:17:48 | Araq | that and I don't fight these things forever |
16:18:05 | Araq | so apparently now 'func' is acceptable |
16:19:44 | * | dddddd quit (Remote host closed the connection) |
16:19:56 | FromDiscord_ | <demotomohiro> there are many procs with `noSideEffect` pragma in Nim/lib |
16:20:56 | Yardanico | just replace them all xD |
16:23:37 | Yardanico | to be honest I don't really use the effect system though :P |
16:24:15 | Yardanico | well I mean I don't use noSideEffect or tags |
16:28:51 | FromDiscord_ | <demotomohiro> @Yardanico why? dont you use noSideEffect? |
16:29:14 | Yardanico | well, because I don't really need it in my own code :P |
16:29:25 | Yardanico | i mostly write code or procedures which mutate stuff |
16:29:28 | Yardanico | not pure functions |
16:30:10 | * | a_b_m quit (Quit: Leaving) |
16:31:54 | FromDiscord_ | <demotomohiro> pure function means if all inputs are constant, compiler can replace function call to constant. |
16:32:25 | Yardanico | well, I thought a pure function is "Its return value is the same for the same arguments. " |
16:32:30 | Yardanico | even if the arguments are decided on runtime |
16:32:55 | Yardanico | and ". Its evaluation has no side effects." |
16:34:02 | Yardanico | ah nvm I didn't understand your message |
16:38:49 | * | akitoshi joined #nim |
16:40:33 | akitoshi | Hi, what’s the nim equivalent of D’s opDispatch? |
16:40:46 | Yardanico | what does that do? |
16:41:28 | akitoshi | Member names not found in a class or struct can be forwarded to a template function named opDispatch for resolution |
16:42:17 | lqdev[m] | akitoshi: experimental dot operators https://nim-lang.org/docs/manual_experimental.html#special-operators-dot-operators |
16:42:51 | Yardanico | and really I don't think you'd need that in Nim with macros and stuff |
16:43:53 | FromDiscord_ | <demotomohiro> that sound like this: https://nim-lang.org/docs/manual.html#procedures-properties |
16:46:21 | leorize | Yardanico: as long as the function don't touch states other than the ones it can reach via parameters, it's qualified for {.noSideEffect.} |
16:46:28 | Yardanico | leorize: oh really? |
16:46:34 | leorize | yes |
16:46:38 | Yardanico | well, I also use "var Type" sometimes |
16:46:43 | Yardanico | that doesn't count I guess? |
16:46:48 | leorize | Nim's definition is really lax |
16:46:51 | leorize | that one is allowed |
16:47:05 | Zevv | leorize: afaik that's not true - it's not "no side effects" in the FP sense, right? |
16:47:15 | leorize | yep |
16:47:22 | FromDiscord_ | <Rika> in the fp sense, all args are immutable no? |
16:47:58 | Zevv | Oh I'm wrong, what leorize says is what the manual says |
16:47:59 | leorize | https://play.nim-lang.org/#ix=28NP |
16:48:28 | leorize | var T is supported |
16:48:52 | leorize | the only thing Nim won't let you is when you access states that shouldn't be accessible via parameters |
16:51:25 | akitoshi | lqdev[m]: thanks, dot operator works like a charm :) |
16:55:48 | FromDiscord_ | <demotomohiro> oh, I can even call time.epochTime() in func. |
16:55:48 | FromDiscord_ | <demotomohiro> https://play.nim-lang.org/#ix=28NQ |
16:55:54 | Yardanico | waat |
16:56:06 | Yardanico | that should certainly be disallowed |
16:56:41 | lqdev[m] | that seems broken |
16:57:39 | FromDiscord_ | <demotomohiro> It seems func in Nim only means it doesn't have side effect. It doesn't mean same return value for same argument. |
16:58:19 | Yardanico | well reading time from system shouldn't be allowed anyway |
16:58:23 | Araq | it means what the spec says it means |
16:58:47 | Araq | but epochTime should have .sideEffect, it does have a .tag though, yay |
17:06:33 | lqdev[m] | not sure now reading time is a side effect, but ok |
17:06:43 | lqdev[m] | s/now/how/ |
17:07:03 | lqdev[m] | it's not like reading time in a thread will break something |
17:07:19 | Yardanico | it's about accessing global state and stuff like that |
17:07:30 | Yardanico | "echo" is a side effect too |
17:07:37 | lqdev[m] | then "side effect" is a bit of a misnomer. |
17:07:45 | lqdev[m] | echo does have side effects, ofc |
17:07:51 | lqdev[m] | because it writes global state |
17:08:05 | lqdev[m] | but reading global state shouldn't be a side effect imo |
17:08:33 | Araq | it works out if the .importc'ed procs are annotated properly |
17:08:39 | lqdev[m] | maybe I'm just dumb, idk. |
17:08:43 | Araq | but often they are not, see epochTime |
17:09:26 | Araq | noSideEffect = proc result only depends on its parameters = proc doesn't use global state |
17:11:40 | Yardanico | yeah I understood now, seems like I could make most of my "proc" as "func" |
17:13:27 | Yardanico | is there an easy way to which side effects does my proc have? |
17:13:30 | Yardanico | to see* |
17:14:59 | Yardanico | ah, well, one way is to use "nim doc" :P |
17:15:19 | shashlick | any other crucial choosenim issues open? |
17:15:20 | leorize[m] | just mark it with nosideeffects :p |
17:15:28 | Yardanico | leorize: it doesn't say which side effects exactly |
17:15:39 | leorize[m] | iirc there's also an {.effects.} statement that print them |
17:15:45 | Yardanico | ah right |
17:15:46 | FromDiscord_ | <demotomohiro> Should I make a issue about I can use epochTime in func? |
17:15:50 | Yardanico | yeah |
17:16:43 | * | ptdel joined #nim |
17:16:52 | leorize[m] | yes |
17:21:01 | * | abm joined #nim |
17:29:01 | * | skellock quit (Ping timeout: 252 seconds) |
17:38:44 | FromDiscord_ | <demotomohiro> done: https://github.com/nim-lang/Nim/issues/13306 |
17:38:47 | disbot | ➥ I can use times.epochTime() in func. ; snippet at 12https://play.nim-lang.org/#ix=28O8 |
17:45:41 | shashlick | how do you get osx to load a brew installed osx? |
17:45:49 | shashlick | ugh brew installed openssl |
17:45:54 | disruptek | reading time is an effect because it helps make unreproducible builds. |
17:46:14 | shashlick | i want it to load a different libcrypto.dylib |
17:51:52 | shashlick | got it - https://stackoverflow.com/questions/38670295/homebrew-refusing-to-link-openssl |
17:52:10 | disruptek | shashlick how come you aren't at fosdem? |
17:52:16 | disruptek | HOW COME |
17:52:27 | shashlick | too far man |
17:52:31 | shashlick | i'll come some day |
17:52:42 | shashlick | bundle some work travel with it perhaps |
17:53:32 | FromDiscord_ | <Recruit_main_70007> i will go to Nimcom |
17:56:00 | * | skellock joined #nim |
18:02:22 | * | skellock quit (Ping timeout: 268 seconds) |
18:02:27 | disruptek | hmm, someone came from california, shashlick. |
18:02:37 | disruptek | what does that say about you? |
18:03:03 | disruptek | very, very troubling. you just might be too old. |
18:04:16 | FromDiscord_ | <kodkuce> old xD |
18:07:02 | Zevv | disruptek: when do you travel? |
18:07:12 | Zevv | or are you in .be already |
18:08:45 | disruptek | i'm here; just took me awhile to find a quality source of glass without usng the french word for crystal. |
18:08:54 | * | nsf joined #nim |
18:09:29 | Zevv | you'll manage. If they don't understand you, just try speaking louder |
18:10:52 | disruptek | turns out track marks are a form of written communication for more than just leo. |
18:11:23 | shashlick | 😄 |
18:12:06 | disruptek | wait, is .be not belize? |
18:12:32 | disruptek | i've made a terrible mistake. |
18:12:42 | Zevv | the fun you'll have |
18:13:27 | livcd | .be is belgian |
18:13:32 | disruptek | but i brought enough edibles for a week. 🤭 |
18:13:49 | Zevv | en we're all waiting for you here in belarus :( |
18:14:04 | disruptek | sumbitch |
18:18:55 | shashlick | Does anyone know where the dynlib search code is in the compiler |
18:19:54 | shashlick | Where stuff like https://github.com/nim-lang/Nim/blob/devel/lib/wrappers/openssl.nim#L68 gets resolved |
18:21:06 | disruptek | i know to embed the path you need to rpath because dumb. |
18:21:25 | * | disruptek out. |
18:23:15 | FromDiscord_ | <dissociative Peach> Hello, I don't need help right now but I'd like to say that I am using nim to write a system tool for managing a tree of jails/vms/sessions, with helpers to change information for all or part of children. I'd wager there's probably tools like thiss existing, but I do not know what the name of them is, so I do not know how many there are. |
18:23:48 | FromDiscord_ | <dissociative Peach> I will probably come for help in the near future. |
18:25:45 | * | moon-chilled joined #nim |
18:29:45 | * | krux02 joined #nim |
18:50:50 | shashlick | https://github.com/dom96/choosenim/issues/122#issuecomment-580862084 |
18:50:52 | disbot | ➥ SIGBUS: Illegal storage access. (Attempt to read from nil?) on macOS ; snippet at 12https://play.nim-lang.org/#ix=27Z9 |
18:56:51 | * | akitoshi quit (Quit: Connection closed for inactivity) |
19:06:10 | FromGitter | <timotheecour> @shashlick ⏎ ⏎ > proc loadLibPattern*(pattern: string, globalSymbols = false): LibHandle = |
19:08:42 | shashlick | thanks, I found it |
19:10:51 | * | skellock joined #nim |
19:16:03 | * | skellock quit (Ping timeout: 272 seconds) |
19:16:16 | FromGitter | <timotheecour> @shashlick could that then simply be a case of choosenim built using version 1.0 of ssl and then at runtime it loads 1.1 and then crashes? |
19:16:50 | shashlick | could be - not forward compatible? |
19:17:06 | shashlick | well rather backward compatible |
19:18:06 | FromGitter | <timotheecour> it’s a real possibility; u could try to repro by building choosenim w 1.1 and see if problem persists for eg |
19:18:13 | * | ptdel quit (Ping timeout: 245 seconds) |
19:21:08 | shashlick | okay will try |
19:21:14 | shashlick | then might need to build on travis with latest ssl |
19:21:19 | FromDiscord_ | <Clyybber> timotheecour: In your make pr, you saw a 5 times speed up with make -j |
19:21:21 | FromDiscord_ | <Clyybber> right? |
19:21:36 | FromDiscord_ | <Clyybber> What was the speedup after doing make -j $(nproc) ? |
19:22:02 | FromGitter | <timotheecour> on my laptop (16 logical cpu), and for time(building csources), yes |
19:22:41 | FromDiscord_ | <Clyybber> I think we should be fine with just make -j then |
19:25:01 | FromDiscord_ | <Clyybber> for portabilities sake |
19:26:01 | FromGitter | <timotheecour> no, read PR history+comments, and read also https://unix.stackexchange.com/questions/316644/is-make-j-with-no-argument-dangerous + other threads, it may cripple performance as it can spawn unlimited jobs |
19:26:05 | FromDiscord_ | <Clyybber> because afaict the script will fail unless you have nproc sysctl or getconf available |
19:26:27 | FromDiscord_ | <Clyybber> timotheecour: It will just spawn as many jobs as they are files to process independently |
19:27:21 | FromGitter | <timotheecour> yes, that can cripple a machine with low number of logical cpu’s; and it all depends on load average and other factors, so i changed it from my original version which just had `make -j` |
19:27:43 | FromDiscord_ | <Clyybber> but its not portable |
19:27:47 | FromDiscord_ | <Clyybber> and that is worse IMO |
19:28:02 | FromDiscord_ | <Clyybber> csources doesn't contain that many files anyways |
19:28:44 | FromGitter | <timotheecour> if we ever find a machine where `logicalCpus=$(nproc 2>/dev/null || sysctl -n hw.logicalcpu 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null)` fails, it’s trivial enough to add some default (say, 1) in a future PR |
19:29:11 | FromDiscord_ | <Recruit_main_70007> sorry to interrupt, but i was wondering if they were any active ML framework, i am unable to properly intall Nimtorch and Arraymancer needs a dll i cant provide |
19:29:32 | FromDiscord_ | <Clyybber> Why can you not provide it? |
19:29:54 | FromDiscord_ | <Clyybber> timotheecour: Right. I'll add a default |
19:30:05 | FromDiscord_ | <Recruit_main_70007> i just tried everything i could, and didnt work |
19:30:58 | FromDiscord_ | <Clyybber> timotheecour: Also that nproc + 1 thing, its a stupid heuristic. On my machine when having firefox running it makes stuff slower |
19:31:14 | FromGitter | <timotheecour> clybber cool, thanks; please also add a comment in your PR linking to something like https://unix.stackexchange.com/questions/316644/is-make-j-with-no-argument-dangerous so that the next person doesn’t wonder about the same thing |
19:31:15 | FromDiscord_ | <Clyybber> But I know its used a lot :p |
19:31:50 | FromDiscord_ | <Clyybber> timotheecour: I'll add it in the commit message, that seems cleaner |
19:32:49 | FromDiscord_ | <Clyybber> And normally schedulers should be smart enough not to lock up your system with make -j |
19:33:43 | FromGitter | <timotheecour> well commit messages are not as visible as in the code, but up to u; the +1 heuristic should make a benefitial difference for machienes with low logical cpu count (eg 1 turns into 2 etc) ; if it’s detrimental i’d like to look into it, mind sharing more details (either PM or as a comment in PR where i introduced it) |
19:34:38 | FromDiscord_ | <Clyybber> its detrimental if your cpu is already on load |
19:34:45 | FromDiscord_ | <Clyybber> so that cpu is the bottleneck |
19:34:47 | FromDiscord_ | <Clyybber> and not io |
19:35:10 | FromDiscord_ | <Clyybber> which I think might be on CIs but I havent measured it |
19:35:26 | FromGitter | <timotheecour> there’s also: ⏎ ⏎ > `-l [load], --load-average[=load]` |
19:35:30 | FromGitter | <timotheecour> in make |
19:36:08 | FromDiscord_ | <Clyybber> Oh, I see. |
19:36:34 | FromDiscord_ | <Clyybber> That could allow us to get rid of nproc || .... |
19:36:40 | FromDiscord_ | <Clyybber> Right? |
19:39:14 | * | onionhammer quit (Ping timeout: 240 seconds) |
19:46:07 | * | skellock joined #nim |
19:48:05 | FromGitter | <timotheecour> not really; you’d have to carefully craft that load average; I tried on my system `make -j -l X` with different values of X and it’s slower than with `-j $nproc`unless X is large enough, and u’d need nproc to set X anyway |
19:50:41 | * | skellock quit (Ping timeout: 265 seconds) |
19:52:25 | FromDiscord_ | <Clyybber> just set x to 90? |
19:52:35 | shashlick | gosh nim.cfg is too brittle |
19:52:42 | FromDiscord_ | <Clyybber> use nims |
19:52:44 | FromDiscord_ | <Clyybber> : ) |
19:52:55 | FromGitter | <timotheecour> ya use nims, i hope nim.cfg can die |
19:53:02 | shashlick | trying to fix some mingw issues in the repo |
19:53:03 | FromDiscord_ | <Clyybber> same |
19:54:08 | shashlick | even if I set amd64.windows.gcc.cpp.exe, nim still uses g++ |
19:54:28 | shashlick | also unclear how to @if cpu = x |
19:54:51 | FromGitter | <timotheecour> `just set x to 90?` that would behave essentially like unlimited; crafting `-l` is ok on one fixed machine, but having a heuristic that works in a range of machines (from low powered build bots to hight powered local dev machienes) is a much harder task than the simple nproc+1 heuristic; YMMV |
19:56:23 | FromDiscord_ | <Clyybber> but low powered build bots will reach 90 way faster so it *balances* itself out |
19:56:31 | FromDiscord_ | <Clyybber> If I understood it right |
19:57:01 | shashlick | same stuff works on osx but not on linux |
19:57:21 | * | skellock joined #nim |
19:58:20 | FromDiscord_ | <Clyybber> shashlick: Weird |
19:59:47 | shashlick | https://github.com/nim-lang/Nim/compare/devel...genotrance:mingwbugs?expand=1 |
20:00:27 | shashlick | so `nim c -d:mingw` and `nim cpp -d:mingw` now work correctly on osx but on linux, only `nim c -d:mingw` works but `nim cpp -d:mingw` uses /usr/bin/g++ |
20:02:11 | * | skellock quit (Ping timeout: 268 seconds) |
20:02:29 | FromGitter | <timotheecour> @shashlik i had a PR in progress that would output the command line flags (joined all the various from nim.cfg, config.nims, command line flags); would that help? |
20:03:00 | FromGitter | <timotheecour> (would output it to `nim dump` ’s json output that is) |
20:03:13 | shashlick | would nim dump -d:mingw work |
20:03:53 | FromGitter | <timotheecour> it’d output exactly what the compiler sees after it processes all configs |
20:05:17 | shashlick | besides config/nim.cfg, what else affects nim's selection of gcc, etc |
20:06:19 | * | letto_ quit (Ping timeout: 252 seconds) |
20:08:42 | FromGitter | <kaushalmodi> config.nims |
20:09:50 | shashlick | gosh what dumb stuff, i was thinking I was testing nimdevel while nim = 1.0.4 |
20:13:40 | shashlick | phew - https://github.com/nim-lang/Nim/pull/13307 |
20:13:41 | disbot | ➥ Fix #10717, fix #13284 |
20:21:55 | * | ftsf quit (Ping timeout: 268 seconds) |
20:22:50 | * | skellock joined #nim |
20:22:58 | * | icebattle quit (Ping timeout: 268 seconds) |
20:27:42 | * | skellock quit (Ping timeout: 265 seconds) |
20:37:11 | * | letto_ joined #nim |
20:38:25 | FromDiscord_ | <Clyybber> timotheecour: FWIW -j -l is exactly as fast as -j (nproc) |
20:38:44 | FromDiscord_ | <Clyybber> -l 80 that is |
20:39:07 | FromDiscord_ | <Clyybber> (1 sec faster actually, not that it matters) |
20:40:15 | FromDiscord_ | <Clyybber> I meant "as fast as -j (nproc + 1)" |
20:40:20 | FromGitter | <timotheecour> Yes on my dev machine, but u’d need to try it on other dev machines too (eg CI machiens with low logical cpu count) and different environment (eg w resource contention) |
20:40:42 | FromDiscord_ | <Clyybber> I think its even better there |
20:40:48 | FromDiscord_ | <Clyybber> since it takes into account the actual load |
20:40:54 | FromDiscord_ | <Clyybber> and not just the core count |
20:41:43 | FromGitter | <timotheecour> with `-l 80` u’d allow spawn ~80 jobs and run into issues mentioned in https://unix.stackexchange.com/questions/316644/is-make-j-with-no-argument-dangerous |
20:42:41 | FromGitter | <timotheecour> (ie: 80 probably too high, but then picking a good value that works across the baord is not easy at all, compared to simple nproc heuristic) |
20:44:45 | FromGitter | <timotheecour> point is that `nproc+1` heuristic is commonly used so it’s a safe choice; if u somehow find an article that shows a better multi-scenario setting involving `-j -l X` then that would be a convincing argument. |
20:45:25 | * | icebattle joined #nim |
20:46:19 | FromDiscord_ | <Clyybber> timotheecour: I'm not doing -j 80 |
20:46:28 | FromDiscord_ | <Clyybber> -l 80 takes into account the load |
20:47:05 | FromDiscord_ | <Clyybber> That article would be `man make` :p |
20:47:15 | FromDiscord_ | <Clyybber> I mean, its there for exactly this purpose |
20:47:47 | FromGitter | <timotheecour> I know; my point is `-j -l 80` means: spawn infinitely many jobs until the load average reaches 80.0 |
20:48:05 | FromDiscord_ | <Clyybber> yep, and thats a much better heuristic |
20:49:00 | FromGitter | <timotheecour> feel free to open a PR with your suggestion, I’m not convinced at all |
20:49:39 | FromDiscord_ | <Clyybber> Alright |
20:50:58 | * | theelous3 quit (Ping timeout: 260 seconds) |
20:51:53 | FromDiscord_ | <Clyybber> So I tried it on my raspberry pi 3 now too |
20:52:09 | FromDiscord_ | <Clyybber> And it is as fast as -j (nproc + 1) |
20:52:32 | FromDiscord_ | <Clyybber> It doesn't matter wether -l 80 or 90 |
20:55:43 | FromGitter | <timotheecour> right, the value is so high it won’t be actually used; the only issue is with machines with very low logical cpu count ⏎ ⏎ > CPU: 4× ARM Cortex-A53, 1.2GHz ⏎ ⏎ has 4 (maybe 8 logical, i dunno); u shd try also on machines with just 1 (eg u can try on AWS using the free tier machines) [https://gitter.im/nim-lang/Nim?at=5e34944f73ddad4acd8536fe] |
20:57:37 | FromDiscord_ | <Clyybber> No need to try |
20:57:46 | FromDiscord_ | <Clyybber> On 1 core its just: start job |
20:58:07 | FromDiscord_ | <Clyybber> if we are not loaded (io bottleneck) spawn another |
20:58:39 | FromDiscord_ | <Clyybber> I'm sure you'll agree that its a much better heuristic than nproc + 1 |
20:59:15 | FromDiscord_ | <Clyybber> Btw timotheecour what does `echo_run` do exactly? |
20:59:39 | FromGitter | <timotheecour> prints cmd then runs cmd. very useful. |
20:59:58 | FromDiscord_ | <Clyybber> Ah, right. $* are all args, cool thanks |
21:00:39 | FromDiscord_ | <Clyybber> Any reason to use printf "/n.../n" instead of just echo? |
21:02:22 | FromDiscord_ | <Clyybber> ping timotheecour |
21:02:30 | * | skellock joined #nim |
21:04:40 | FromDiscord_ | <Clyybber> also, why can we only run parallell with no options given? |
21:04:47 | * | skellock quit (Client Quit) |
21:04:47 | shashlick | yay I don't need to do anything for Dash docsets |
21:05:18 | * | skellock joined #nim |
21:09:09 | FromGitter | <timotheecour> 1) printf is like echo but more formatting can be done; i’ve adapted it from a personal script where it did make a difference; here it maybe doesn’t make a difference ⏎ 2) also, why can we only run parallell with no options given? ⏎ because the makefile doesn’t accept options (eg `--cpu`) |
21:10:17 | * | skellock quit (Quit: WeeChat 2.7) |
21:14:03 | * | narimiran quit (Ping timeout: 245 seconds) |
21:18:47 | * | dddddd joined #nim |
21:21:16 | FromDiscord_ | <Clyybber> alright |
21:41:28 | shashlick | what do you do with this - cannot bind another '=destroy' to: SvnzFileObj; previous declaration was constructed here implicitly |
21:41:43 | shashlick | my destroy does specific stuff |
21:47:40 | * | luis_ joined #nim |
21:55:09 | FromGitter | <timotheecour> @shashlick for ssl stuff, u may wanna look at very similar past issues related to SSL in nim eg https://github.com/nim-lang/Nim/pull/11272 ⏎ ⏎ > Other dynamic libraries (like libpg) load diffetent openSSL version then what nim loads. ⏎ > Having two different openSSL loaded version causes a crash. ⏎ ... [https://gitter.im/nim-lang/Nim?at=5e34a23d594a0517c25ca1af] |
21:55:12 | disbot | ➥ Add force openSSL version with -d:sslVersion=x.x.x ; snippet at 12https://play.nim-lang.org/#ix=28PS |
21:57:57 | * | Ven`` joined #nim |
22:01:33 | FromDiscord_ | <Clyybber> shashlick: You gotta put your destroy definition more to the top |
22:02:08 | * | Ven`` is now known as Ven_de_Thiel |
22:02:44 | FromDiscord_ | <Clyybber> timotheecour: Here it is https://github.com/nim-lang/Nim/pull/13308 |
22:02:45 | disbot | ➥ Make build_all.sh more portable and a bit simpler |
22:04:32 | FromGitter | <deech> Is there a stdlib function that translates from `bool` to `cint` and vice versa? |
22:05:16 | FromDiscord_ | <Clyybber> deech: Try ord |
22:05:36 | FromDiscord_ | <Clyybber> someBool.ord.cint |
22:05:50 | FromDiscord_ | <Clyybber> cint(ord(someBool)) |
22:06:11 | FromGitter | <Clyybber> @deech |
22:06:38 | FromGitter | <deech> Nice, thanks! |
22:07:21 | * | NimBot joined #nim |
22:07:24 | shashlick | Cool I'll |
22:07:24 | FromGitter | <Clyybber> np |
22:08:56 | FromGitter | <Clyybber> Cool I'll too |
22:14:02 | * | krux02 quit (Remote host closed the connection) |
22:14:37 | * | krux02 joined #nim |
22:15:26 | shashlick | Worked! |
22:16:05 | * | ptdel joined #nim |
22:16:39 | FromGitter | <Clyybber> Nice |
22:18:02 | shashlick | @timotheecour I agree with dom96 though - for the end user, it doesn't help since the version we pick at build time may not be present on his system at all |
22:19:38 | FromDiscord_ | <Recruit_main_70007> is it faster to compile without gc despite warnings comming up? |
22:20:22 | FromGitter | <Clyybber> faster to compile? |
22:20:25 | FromGitter | <Clyybber> or faster to run? |
22:20:54 | FromDiscord_ | <Recruit_main_70007> both |
22:21:16 | FromGitter | <Clyybber> to compile no difference |
22:21:47 | FromGitter | <Clyybber> but running it with no gc (gc:none) |
22:21:57 | FromGitter | <Clyybber> means that seqs, refs and strings will leak |
22:26:25 | FromDiscord_ | <Recruit_main_70007> so, should i use none? |
22:27:06 | FromGitter | <Clyybber> nope |
22:27:10 | FromGitter | <Clyybber> you should simply use a gc |
22:27:17 | FromGitter | <Clyybber> or --gc:arc |
22:27:38 | FromDiscord_ | <Recruit_main_70007> ok |
22:28:23 | FromDiscord_ | <Recruit_main_70007> i think that the none garbage collector option should be improved, it would attract some C/C++ programmers |
22:28:57 | FromGitter | <Clyybber> --gc:arc is not a garbage collector |
22:29:13 | FromGitter | <Clyybber> and we are actively working on improving it :) |
22:29:37 | FromDiscord_ | <Recruit_main_70007> i thought it said, a garbage collector to rule them all or something like that |
22:29:55 | FromGitter | <Clyybber> its not a real garbage collector |
22:29:58 | FromGitter | <Clyybber> its deterministic |
22:30:07 | FromGitter | <Clyybber> for refs it uses refcounting though |
22:30:30 | FromDiscord_ | <Recruit_main_70007> hmm, how new is it, 1.0.4 seems to not have it |
22:30:39 | FromGitter | <timotheecour> @shashlick could we add logic to check at runtime which version of sll is loaded, then proceed accordingly using runtime dispatch |
22:30:48 | FromGitter | <Clyybber> There its probably called --gc:destructors |
22:30:58 | FromGitter | <Clyybber> arc is just an abbreviation |
22:31:12 | FromGitter | <Clyybber> but if you plan on using it |
22:31:19 | FromGitter | <Clyybber> using devel is best |
22:31:44 | FromDiscord_ | <Recruit_main_70007> explain me, |
22:33:18 | FromGitter | <Clyybber> what? |
22:33:29 | FromDiscord_ | <Recruit_main_70007> the dvel thing |
22:33:39 | FromDiscord_ | <Clyybber> its the latest version |
22:33:42 | Zevv | you get the latest source from github |
22:33:48 | Zevv | and build from source |
22:33:59 | Zevv | that is what all the true hackers do |
22:35:12 | FromDiscord_ | <Clyybber> what Zevv said :p |
22:36:30 | FromDiscord_ | <Recruit_main_70007> i would love to, (i am a maniac of having the latest version), but the thing is that Nim is the lowest level ive got (without counting .Net since it already has all the compilers and shit needed) and i have 0 experience with C/C++ compilers, so will just wait until an stable release comes pre compiled |
22:36:55 | * | abm quit (Quit: Leaving) |
22:37:02 | FromDiscord_ | <Clyybber> you don't have to have much experience |
22:37:12 | FromDiscord_ | <Clyybber> you don't even have to build it |
22:37:17 | FromDiscord_ | <Clyybber> one sec |
22:38:34 | FromDiscord_ | <Clyybber> try this: https://github.com/nim-lang/nightlies/releases/download/2020-01-23-version-1-0-89b39ee/nim-1.0.6-windows_x64.zip |
22:38:53 | FromDiscord_ | <Clyybber> or in general look here for precompiled nightlies: https://github.com/nim-lang/nightlies/releases |
22:39:44 | FromDiscord_ | <Clyybber> the last ones don't seem to have windows though, and I assume you are on windows |
22:39:51 | FromDiscord_ | <Clyybber> but the one I sent you should be recent enough |
22:40:02 | FromDiscord_ | <Recruit_main_70007> i will have a look at them, thanks |
22:40:05 | FromDiscord_ | <Clyybber> np |
22:43:18 | * | abm joined #nim |
23:06:53 | shashlick | @timotheecour - that will be a special exception for openssl |
23:09:02 | * | icebattle quit (Ping timeout: 268 seconds) |
23:15:25 | * | nsf quit (Quit: WeeChat 2.7) |
23:29:36 | * | skellock joined #nim |
23:40:16 | * | skellock quit (Quit: WeeChat 2.7) |
23:43:57 | * | theelous3 joined #nim |
23:44:27 | * | oprypin quit (Quit: Bye) |
23:44:35 | * | oprypin joined #nim |
23:44:45 | * | icebattle joined #nim |
23:48:12 | * | ng0 joined #nim |
23:48:12 | * | ng0 quit (Changing host) |
23:48:12 | * | ng0 joined #nim |
23:49:10 | * | ng0 quit (Client Quit) |
23:50:58 | * | icebattle quit (Ping timeout: 268 seconds) |
23:51:52 | * | theelous3 quit (Ping timeout: 265 seconds) |