00:05:11 | * | abm quit (Read error: Connection reset by peer) |
00:20:19 | * | jaens[m] joined #nim |
01:00:02 | * | Jesin joined #nim |
01:00:20 | FromDiscord | <Theodore> hoh |
01:01:49 | * | Tanger joined #nim |
01:21:19 | * | endragor quit (Remote host closed the connection) |
01:21:27 | * | endragor joined #nim |
01:22:22 | * | lritter quit (Quit: Leaving) |
01:31:58 | * | a_chou quit (Ping timeout: 260 seconds) |
01:32:25 | * | apahl quit (Ping timeout: 244 seconds) |
01:34:07 | FromDiscord | <ThothLoki> how do i get the exe to not show the cmd? |
01:34:24 | * | apahl joined #nim |
01:34:36 | FromDiscord | <Elegant Beef> `-d:gui` iirc |
01:34:51 | FromDiscord | <ThothLoki> thanks. lemme try that |
01:34:58 | FromDiscord | <Elegant Beef> ah sorry it's --app:gui |
01:35:52 | FromDiscord | <ThothLoki> perfect! thanks a lot |
01:39:08 | * | clemens3 quit (Ping timeout: 256 seconds) |
01:39:08 | FromDiscord | <ThothLoki> @Elegant Beef how about an icon? i have an .ico file that i would like to wrap in |
01:39:23 | FromDiscord | <Elegant Beef> I dont know anything about the windows icon api |
01:40:20 | FromDiscord | <ThothLoki> lol. dammit |
01:40:32 | * | clemens3 joined #nim |
01:40:34 | FromDiscord | <ThothLoki> all of you are using good operating systems |
01:40:38 | FromDiscord | <ThothLoki> wtf |
01:40:51 | FromDiscord | <Elegant Beef> A majority of the nim community use linux 😄 |
01:41:12 | disruptek | nah; araq doesn't use a good os. |
01:41:15 | FromDiscord | <himu> sent a code paste, see https://play.nim-lang.org/#ix=2xHS |
01:41:32 | * | a_chou joined #nim |
01:42:33 | FromDiscord | <himu> (edit) 'https://play.nim-lang.org/#ix=2xHS' => 'https://play.nim-lang.org/#ix=2xHT' |
01:42:52 | disruptek | because it's a qualifier for the variable, not for the type. |
01:43:33 | FromDiscord | <himu> sent a code paste, see https://play.nim-lang.org/#ix=2xHU |
01:43:54 | FromDiscord | <ThothLoki> i like linux. that is why i originally chose python then nim |
01:44:40 | FromDiscord | <minierolls> what would the relation between python and linux be? |
01:44:48 | FromDiscord | <ThothLoki> python works on all OSs |
01:44:53 | FromDiscord | <ThothLoki> so does NIM |
01:44:58 | FromDiscord | <Elegant Beef> Yea but python sucks and linux doesnt 😛 |
01:45:06 | disruptek | dude, if you have something to say, please say it in chat. it's a huge pita for irc people to read your code pastes. |
01:45:09 | FromDiscord | <ThothLoki> i hwrite for linux, mac and windows |
01:45:12 | FromDiscord | <minierolls> ah, i just didnt know why liking linux lead to liking cross platform |
01:45:35 | FromDiscord | <ThothLoki> @Elegant Beef i actually like python. i dont like that you cant compile it |
01:45:55 | FromDiscord | <ThothLoki> oh. i like linux but end up writing a lot for windows |
01:46:04 | FromDiscord | <minierolls> oo icic |
01:46:06 | FromDiscord | <ThothLoki> that is where cross platform comes from for me |
01:46:13 | FromDiscord | <minierolls> thats a sad but also true story for me 😦 |
01:46:21 | FromDiscord | <himu> sent a code paste, see https://play.nim-lang.org/#ix=2xHX |
01:46:23 | FromDiscord | <ThothLoki> and i like to not have to know 20 different languages to write the same app |
01:51:04 | FromGitter | <deech> Is anyone using `nim` with Visual C++ on Windows? |
01:51:29 | FromDiscord | <ThothLoki> not i. |
01:51:38 | FromDiscord | <minierolls> also not i |
01:51:54 | FromDiscord | <ThothLoki> VSC ftw |
01:52:37 | FromGitter | <deech> So I guess `mingw` is the way to go? |
01:53:05 | FromDiscord | <minierolls> is there a particular reason for wanting to use the C++ backend? |
01:53:26 | FromDiscord | <minierolls> ive used `nim` with the C backend on Windows before |
01:54:07 | FromDiscord | <himu> > is there a particular reason for wanting to use the C++ backend?↵@minierolls C backend works fine! |
01:54:16 | FromDiscord | <himu> (edit) 'fine!' => 'fine on MinGW!' |
01:54:37 | FromDiscord | <minierolls> yep, but C backend also works fine without MinGW |
01:55:40 | FromGitter | <deech> I'm trying to interop with C++ libs on Windows. |
01:56:01 | FromGitter | <deech> But it's good to know that it does work with Visual C. |
01:56:54 | FromDiscord | <minierolls> also, does anyone know if I am misunderstanding something about the sort function:↵I have a sequence of OrderedTable[string, string] elements, and call `my_seq.sort do (x, y: OrderedTable[string, string]) -> int: cmp(x["key"], y["key"])` but I get a type mismatch error |
01:59:12 | FromDiscord | <Rika> what type mismatch errpr |
01:59:22 | * | a_chou quit (Ping timeout: 256 seconds) |
01:59:23 | FromDiscord | <minierolls> "type mismatch: got <seq[OrderedTable[system.string, system.string]], void>" |
02:00:26 | FromDiscord | <minierolls> i get the same error when i define a separate comparison function and provide it to the `sort` procedure without using `do` syntax (albeit the "void" is changed to the type of the cmp procedure") |
02:00:37 | FromDiscord | <minierolls> (edit) 'procedure")' => 'procedure)' |
02:00:48 | FromDiscord | <Rika> compiles just fine in playground |
02:00:59 | FromDiscord | <minierolls> interesting |
02:00:59 | FromDiscord | <ThothLoki> ok. so when i make an array, it does not go in the order i put them in the array.↵Is there something i could use with a key, value pair that will output the way i put them in the "dictionary"? |
02:01:01 | FromDiscord | <Rika> !eval import algorithm, tables; var mySeq: seq[OrderedTable[string, string]]; my_seq.sort do (x, y: OrderedTable[string, string]) -> int: cmp(x["key"], y["key"]) |
02:01:04 | NimBot | <no output> |
02:01:08 | FromDiscord | <minierolls> ah i havent imported algorithm |
02:01:10 | FromDiscord | <Rika> compiles just fine |
02:01:10 | FromDiscord | <minierolls> mb, thats prob it |
02:01:31 | FromDiscord | <minierolls> yep import fixes it 🤦 |
02:01:34 | FromDiscord | <Rika> lol |
02:20:19 | * | endragor_ joined #nim |
02:20:19 | * | endragor quit (Read error: Connection reset by peer) |
02:40:01 | * | Cthalupa quit (Ping timeout: 246 seconds) |
02:43:25 | * | muffindrake quit (Ping timeout: 240 seconds) |
02:44:33 | * | Cthalupa joined #nim |
02:46:01 | * | muffindrake joined #nim |
02:56:20 | * | a_chou joined #nim |
03:15:45 | * | a_chou quit (Remote host closed the connection) |
03:37:18 | * | rockcavera quit (Remote host closed the connection) |
03:50:34 | * | gmaggior quit (Quit: Leaving) |
03:52:25 | * | Zectbumo joined #nim |
04:06:02 | * | supakeen quit (Quit: WeeChat 2.9) |
04:06:33 | * | supakeen joined #nim |
04:09:49 | * | Cthalupa quit (Ping timeout: 264 seconds) |
04:11:52 | * | shad0w_ joined #nim |
04:12:09 | shad0w_ | hi ya'll. |
04:12:58 | shad0w_ | i was looking at some issues to get started solving, dippin my toes a little in the compiler. |
04:13:05 | shad0w_ | https://github.com/nim-lang/Nim/issues/15151 |
04:13:07 | disbot | ➥ JS closure compile time error cannot evaluate variable ; snippet at 12https://play.nim-lang.org/#ix=2xIw |
04:13:15 | shad0w_ | ^this caught my eye |
04:13:54 | shad0w_ | can anyone point to the direction, where do i go about it from that? |
04:14:37 | disruptek | no idea; not many people give a shit about js. |
04:15:04 | shad0w_ | sounds... about right. |
04:15:21 | disruptek | the good news is that the js codegen is pretty simple. |
04:16:42 | shad0w_ | https://github.com/nim-lang/Nim/blob/devel/compiler/jsgen.nim this file here right ? |
04:16:45 | * | Cthalupa joined #nim |
04:16:47 | disruptek | yep. |
04:17:06 | shad0w_ | so if were to change something, it'll be there ? |
04:17:16 | disruptek | well, probably not. |
04:17:23 | mipri | since that prints "foo" at compile time (on c backend), maybe it's not a codegen issue |
04:17:30 | disruptek | right. |
04:17:44 | disruptek | plus, you find the bug in the last place you look, not the first. 😉 |
04:18:31 | shad0w_ | the first place could also be the last place if you're lucky that day ;) |
04:18:40 | disruptek | lol |
04:20:27 | shad0w_ | i'll see what i can find on this |
04:20:38 | shad0w_ | should get me atleast somewhere |
04:21:35 | disruptek | it will be useful to get a sense for what gets done in the backend, but it's more likely a frontend issue. |
04:22:03 | shad0w_ | i see. |
04:25:21 | shad0w_ | any debuging tools/tricks i should know before i get started ? |
04:25:30 | disruptek | it's printf-based debugging. |
04:25:36 | shad0w_ | like tracing what the compiler is doing king of stuff |
04:25:46 | disruptek | you can dump P* types using `debug somevar`, which is handy. |
04:26:58 | shad0w_ | you fork from the master and pr to master ? |
04:27:05 | shad0w_ | or devel |
04:27:05 | disruptek | devel to devel |
04:27:10 | shad0w_ | cool |
04:27:21 | shad0w_ | it should just take me 9000 days : ) |
04:27:29 | disruptek | master is an old deprecated version that is retained for compat with old scripts. |
04:28:08 | * | thomasross quit (Ping timeout: 260 seconds) |
04:35:58 | * | shad0w_ quit (Remote host closed the connection) |
04:39:44 | FromDiscord | <flywind> Is Nim suitable for web development which lacks interface? I want to make `ctx.session` support multiple backends(for example RedisSession, FileSession). Any solution(except method or generics)? I maybe use conditional compilation, but it is not extensible. |
04:40:34 | disruptek | i don't see why not. |
04:42:27 | disruptek | if you can't use generics or inheritance, i guess your options are modules, concepts, or object variants. |
04:42:49 | FromDiscord | <flywind> I think users can't define their own backend session using conditional compilation. |
04:43:24 | disruptek | it does seem like a rather big ask. |
04:43:52 | * | narimiran joined #nim |
04:47:12 | FromDiscord | <flywind> https://github.com/planety/prologue/blob/c2d71fecaf27240cce3cf041f496c25a5231da45/src/prologue/core/context.nim#L67 Session is encapsulated into Context object. I will use `method` to see whether they can work |
04:56:25 | FromDiscord | <PizzaFox> how can i handle a 404 error from `httpclient` |
04:57:05 | FromDiscord | <PizzaFox> sent a code paste, see https://play.nim-lang.org/#ix=2xIE |
04:58:07 | FromDiscord | <PizzaFox> sent a code paste, see https://play.nim-lang.org/#ix=2xIF |
05:31:11 | * | solitudesf joined #nim |
05:55:24 | * | pangey__ quit (Ping timeout: 244 seconds) |
05:59:09 | * | pangey joined #nim |
06:01:31 | FromDiscord | <Reki> i think |
06:01:32 | FromDiscord | <Reki> sent a code paste, see https://play.nim-lang.org/#ix=2xIS |
06:01:52 | FromDiscord | <Reki> (edit) 'https://play.nim-lang.org/#ix=2xIS' => 'https://play.nim-lang.org/#ix=2xIT' |
06:04:25 | FromDiscord | <PizzaFox> sent a code paste, see https://play.nim-lang.org/#ix=2xIU |
06:04:34 | FromDiscord | <PizzaFox> ok next question |
06:04:42 | FromDiscord | <PizzaFox> when do i use `re` vs `nre` |
06:05:06 | FromDiscord | <PizzaFox> my experience with re is that it wouldnt ever update the matches `openArray` i passed it so i switched to nre |
06:05:17 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
06:07:24 | * | FromDiscord quit (Remote host closed the connection) |
06:07:38 | * | FromDiscord joined #nim |
06:18:41 | FromDiscord | <Recruit_main707> nice, we are verified |
06:27:52 | * | sagax quit (Remote host closed the connection) |
06:39:36 | * | PMunch joined #nim |
06:45:59 | * | sagax joined #nim |
07:43:43 | FromDiscord | <flywind> Is multi-methods different from methods,? |
07:44:31 | FromDiscord | <lqdev> multimethods enable dispatch based on all parameters rather than just the first parameter |
07:44:39 | FromDiscord | <flywind> https://nim-lang.github.io/Nim/manual.html#multiminusmethods |
07:44:51 | FromDiscord | <flywind> So examples in manual are wrong. |
07:45:35 | FromDiscord | <flywind> The real multi-methods are something in tutorial two. https://nim-lang.github.io/Nim/tut2.html#object-oriented-programming-dynamic-dispatch |
07:45:56 | FromDiscord | <Varriount> araq: Oh cool, RTTI for Arc? |
07:46:04 | FromDiscord | <lqdev> @flywind true that |
07:46:09 | FromDiscord | <lqdev> PRs welcome |
07:46:17 | FromDiscord | <flywind> I will make a pr. thanks. |
07:46:40 | FromDiscord | <Varriount> @flywind Aren't multi-methods disabled/use single dispatch by default? |
07:46:46 | FromDiscord | <Rika> Yes |
07:46:53 | FromDiscord | <Rika> As stated in the docs they linked... |
07:47:58 | FromDiscord | <flywind> Yes, but the multi-threads examples in manual are wrong. They are single dispatch. |
07:49:08 | FromDiscord | <flywind> I was confusing that why the examples doesn't need `multimethods:on` as docs said. |
07:49:25 | FromDiscord | <flywind> (edit) removed 'why' | 'examples' => 'example' |
07:51:09 | FromDiscord | <Recruit_main707> multi methods examples |
07:51:22 | FromDiscord | <flywind> lol |
07:54:55 | Araq | Varriount: trying my best... |
07:55:18 | Araq | the basic idea seems good, the implementation crashes :-) |
07:55:31 | * | shad0w_ joined #nim |
07:56:06 | shad0w_ | i made some progress with the issue here https://github.com/nim-lang/Nim/issues/15151 |
07:56:07 | disbot | ➥ JS closure compile time error cannot evaluate variable ; snippet at 12https://play.nim-lang.org/#ix=2xIw |
07:56:44 | shad0w_ | making `proc main() {.compileTime.}` makes it work with the js compile |
07:56:55 | shad0w_ | using the compileTime pragma |
07:57:05 | shad0w_ | what does this tells me ? |
08:00:43 | PMunch | shad0w_, {.compileTime.} means that the proc is evaluated by the Nim compiler when it compiles your code to JS |
08:01:12 | PMunch | So that code will not exist in the JS output, only the result of calling the procedure on compile-time |
08:01:44 | FromDiscord | <Elegant Beef> Well it doesnt mean the proc run, it just means it doesnt exist at runtime |
08:01:59 | FromDiscord | <Elegant Beef> (edit) 'run,' => 'is ran,' |
08:02:22 | shad0w_ | so when we do |
08:02:29 | shad0w_ | static: something |
08:02:33 | FromDiscord | <Elegant Beef> "proc is evaluated" could be mistaken or ran 😄 |
08:02:57 | shad0w_ | the something is evaluated at AND also present in the code |
08:03:25 | PMunch | Nope, static is a block that will be evaluated on compile-time |
08:03:34 | shad0w_ | while the compileTime pragma just runs it at compile time then removes it from the output? |
08:03:59 | FromDiscord | <Elegant Beef> compiletime removes it, static runs it |
08:04:15 | FromDiscord | <mratsim> if a proc is not evaluated at runtime it will be dead-code eliminated unless it's marked as exportc |
08:07:16 | PMunch | It's weird thought that the compiler behaves differently between JS and C targets |
08:07:38 | shad0w_ | that seems to be the crux of the issue |
08:10:28 | shad0w_ | could be anything in the compilation process causing it. the C target behaves the correct way as the programmer would expect, looking at s at the outside scope when it didn't find it in its own. |
08:11:43 | shad0w_ | in* the outside |
08:13:22 | * | zama quit (Ping timeout: 256 seconds) |
08:26:43 | FromDiscord | <XxDiCaprioxX> does `rand(100)` include 100? |
08:26:43 | * | awe001 joined #nim |
08:29:58 | FromDiscord | <mratsim> yes |
08:30:43 | FromDiscord | <XxDiCaprioxX> Ok thx |
08:42:59 | PMunch | Damn, people seem to really like my terminal table library :P |
08:42:59 | * | kungtotte quit (Read error: Connection reset by peer) |
08:44:58 | FromDiscord | <Elegant Beef> Dont remind me of terminal stuff, it just reminds me i cannot make a terminal 😄 |
08:45:17 | PMunch | Make a terminal? |
08:45:24 | FromDiscord | <Elegant Beef> Yea a term emulator |
08:45:30 | PMunch | You tried? |
08:45:34 | * | kungtotte joined #nim |
08:45:45 | FromDiscord | <Elegant Beef> Yea, i still have 0 clue how pseudoterminals work |
08:47:36 | * | shad0w_ quit (Remote host closed the connection) |
08:50:22 | * | krux02 joined #nim |
08:50:35 | FromDiscord | <Elegant Beef> *If you dont notice by now, i tend to not focus on anything since im inept at finishing anything* 😄 |
08:51:12 | * | vicfred quit (Quit: Leaving) |
08:52:04 | PMunch | Haha, finishing things is my biggest crux |
09:00:53 | * | hnOsmium0001 quit (Quit: Connection closed for inactivity) |
09:08:22 | * | shad0w_ joined #nim |
09:08:35 | shad0w_ | got a nice stack trace here https://pastebin.com/60EyPx0a |
09:09:10 | shad0w_ | just can't make the head and tail of the gen process lol |
09:09:51 | PMunch | Hehe, it's not the easiest thing to get into |
09:10:07 | FromDiscord | <NickSeagull> sent a code paste, see https://play.nim-lang.org/#ix=2xJB |
09:10:12 | PMunch | Damn, I just implemented a DNS message parser/writer with binaryparse, surprisingly easy! |
09:10:14 | FromDiscord | <NickSeagull> (edit) 'https://play.nim-lang.org/#ix=2xJB' => 'https://play.nim-lang.org/#ix=2xJC' |
09:11:05 | FromDiscord | <shad0w> it says its a register based vm with instructions ranging from 1-3 |
09:11:09 | PMunch | @NickSeagull, is the `->` marked as exported to begin with? |
09:11:17 | PMunch | From the `arrows` module |
09:11:25 | FromDiscord | <NickSeagull> Yep PMunch, forgot to add it to this message |
09:11:26 | shad0w_ | it says its a register based vm with instructions ranging from 1-3 |
09:11:38 | FromDiscord | <NickSeagull> (edit) 'https://play.nim-lang.org/#ix=2xJC' => 'https://play.nim-lang.org/#ix=2xJE' |
09:12:07 | FromDiscord | <NickSeagull> (edit) 'this' => 'th' |
09:14:48 | FromDiscord | <NickSeagull> Perhaps macros cannot be `export`ed? |
09:15:11 | * | shad0w_ quit (Remote host closed the connection) |
09:15:31 | PMunch | Seems to work fine the way you did it @NickSeagull: http://ix.io/2xJG |
09:17:07 | FromDiscord | <NickSeagull> Apparently it was due to my `./prelude` form of imports rather than just `prelude`, thanks PMunch |
09:29:44 | * | arecacea1 quit (Remote host closed the connection) |
09:30:32 | * | arecacea1 joined #nim |
09:31:21 | FromGitter | <alehander92> ok Araq |
09:31:29 | FromGitter | <alehander92> I added ContentMutation and ReAssignment levels |
09:31:31 | FromGitter | <alehander92> to the mutations |
09:31:40 | FromGitter | <alehander92> is that similar to what you had in mind back then |
09:36:10 | * | JustASlacker joined #nim |
09:36:52 | Araq | yep |
09:37:18 | Araq | weirdest bug ever: alloc() fails, exitCode is 0 |
09:38:39 | * | apahl quit (Ping timeout: 272 seconds) |
09:39:13 | * | apahl joined #nim |
09:39:54 | Araq | no segfault, nothing |
09:39:59 | Araq | not even a stack overflow |
09:40:10 | Araq | never seen a bug like that before |
09:41:44 | Zevv | wait what you mean the return value of the alloc() call is 0? |
09:42:11 | Araq | no it's a valid pointer, at least it looks like one |
09:42:12 | Zevv | wow |
09:42:18 | Araq | __builtin___memset_chk is the last thing executed |
09:42:41 | * | Cthalupa quit (Ping timeout: 260 seconds) |
09:42:41 | Araq | so probably it's all corrupt somehow |
09:43:07 | * | abm joined #nim |
09:43:07 | Araq | but valgrind could say something else than "exited successfully" (gdb agrees btw) |
09:43:07 | Araq | and it's the same on both Linux and Windows |
09:43:55 | * | NimBot joined #nim |
09:45:41 | * | Cthalupa joined #nim |
09:50:08 | Araq | never mind, found the bug anyway |
09:50:45 | FromDiscord | <mratsim> memory bug are always fun to debug |
09:51:35 | Araq | once upon a time I invented a new systems programming language with a better type system in order to never have to debug so much anymore |
09:53:12 | FromDiscord | <mratsim> once upon a time I decided to use battle-tested condition variables from glibc to ensure I had something correctly implemented to build synchronization primitives on |
09:53:26 | Araq | lol |
09:59:42 | FromGitter | <alehander92> ok Araq |
09:59:45 | FromGitter | <alehander92> you can review |
10:00:09 | FromGitter | <alehander92> i mean it still in flux |
10:00:40 | FromGitter | <alehander92> but the uncommented tests / simple mutation test pass locally |
10:01:20 | FromGitter | <alehander92> should have no additional output and be usable in other files |
10:17:15 | * | Zectbumo quit (Remote host closed the connection) |
10:31:06 | * | endragor_ quit (Read error: Connection reset by peer) |
10:31:11 | * | endragor joined #nim |
10:33:57 | * | synshroud joined #nim |
10:46:36 | * | Tanger quit (Quit: Leaving) |
10:56:40 | Araq | er, I think I found a bug affecting Nim 0.14 and beyond |
10:58:35 | FromDiscord | <mratsim> That's called a skeleton in a closet |
10:58:45 | * | Trustable joined #nim |
11:00:09 | FromDiscord | <ache of head> „We need to address the skeleton in the room.” |
11:08:08 | FromGitter | <alehander92> oh man my infix was rewriting the parent map |
11:17:27 | * | bra-ket quit (Ping timeout: 240 seconds) |
11:19:33 | FromGitter | <alehander92> ok, a bit more ready for review |
11:19:50 | FromGitter | <alehander92> going out bbl |
11:20:03 | * | zyklon joined #nim |
11:22:00 | * | synshroud quit (Quit: ZNC 1.7.5 - https://znc.in) |
11:34:54 | * | superbia1 joined #nim |
11:34:54 | * | superbia1 quit (Client Quit) |
11:35:13 | * | superbia1 joined #nim |
11:35:34 | * | superbia quit (Disconnected by services) |
11:35:36 | * | superbia1 is now known as superbia |
11:37:30 | FromDiscord | <Clyybber> Araq: Whats the bug? |
11:42:40 | FromGitter | <gogolxdong> Is there any RLE(run-length encoding) library? |
11:49:22 | PMunch | Not sure if there is a library for it |
11:49:27 | PMunch | But it's pretty simple to implement |
11:53:04 | Araq | Clyybber: typeinfo.nim setPointer never calls the GC's write barrier |
11:53:31 | Araq | big bug, been in Nim for a years |
11:54:16 | FromDiscord | <mratsim> I'm not sure how related to RLE it is but we have a Run-Length prefix encoding library: https://eth.wiki/fundamentals/rlp |
11:54:37 | FromDiscord | <mratsim> https://github.com/status-im/nim-rlp |
11:58:53 | FromDiscord | <Clyybber> Araq: Damn, nice :D |
11:59:55 | * | endragor quit (Read error: Connection reset by peer) |
12:00:13 | * | endragor joined #nim |
12:00:37 | Araq | the fix is one line but it needs to be backported in time |
12:00:48 | * | antranigv quit (Ping timeout: 260 seconds) |
12:04:36 | * | antranigv joined #nim |
12:06:01 | * | supakeen quit (Quit: WeeChat 2.9) |
12:06:44 | * | Vladar joined #nim |
12:06:45 | * | supakeen joined #nim |
12:09:11 | * | LyndsySimon quit (Quit: Connection closed for inactivity) |
12:10:46 | FromGitter | <gogolxdong> @mratsim thanks ,that might be helpful. |
12:11:23 | FromDiscord | <mratsim> the now maintained code is in https://github.com/status-im/nim-eth/tree/master/eth/rlp |
12:11:55 | FromDiscord | <mratsim> and corresponding tests: https://github.com/status-im/nim-eth/tree/master/tests/rlp |
12:35:49 | Araq | narimiran: any results? |
12:36:02 | narimiran | Araq: not the ones you want to hear.... |
12:36:14 | Araq | :-) |
12:36:19 | Araq | leaks and crashes? |
12:47:46 | * | solitudesf- joined #nim |
12:49:50 | * | solitudesf quit (Ping timeout: 256 seconds) |
13:20:59 | FromDiscord | <Clyybber> Araq: Why do we need RTTI for deepCopy? |
13:21:52 | FromDiscord | <Clyybber> Or rather, why do we need the old one? Does the tinyRtti not suffice to get the fields that we need to copy? |
13:24:02 | FromDiscord | <tomck> sent a code paste, see https://play.nim-lang.org/#ix=2xKT |
13:24:14 | FromDiscord | <tomck> (edit) 'https://play.nim-lang.org/#ix=2xKT' => 'https://play.nim-lang.org/#ix=2xKU' |
13:24:46 | FromDiscord | <tomck> I guess like named inheritance, or inheritance without any virtual functions - i just want to include a struct in antoher |
13:27:05 | FromDiscord | <Clyybber> I remember seeing a macro/template for that |
13:27:11 | FromDiscord | <Clyybber> But I forgot where sorry :/ |
13:27:25 | FromDiscord | <tomck> fair, i'll just write one i guess, ta |
13:40:42 | * | vicfred joined #nim |
13:42:07 | * | waleee-cl joined #nim |
13:44:44 | * | Trustable quit (Remote host closed the connection) |
13:46:55 | * | narimiran quit (Ping timeout: 272 seconds) |
13:59:34 | * | abm quit (Ping timeout: 260 seconds) |
14:08:25 | FromDiscord | <Doongjohn> how can I compare types?↵this is not working: `when T == SomeType: ...`↵so I'm currently doing this: `when $T == $SomeType: ...` |
14:09:05 | FromDiscord | <flywind> use when T is SomeType |
14:10:08 | FromDiscord | <Doongjohn> ohh thanks! |
14:10:20 | FromDiscord | <flywind> np |
14:17:11 | * | femtotones joined #nim |
14:24:53 | FromDiscord | <XxDiCaprioxX> how do I initialize an empty seq of type string? |
14:26:45 | FromDiscord | <lqdev> `var x: seq[string]` |
14:26:57 | FromDiscord | <XxDiCaprioxX> but that is declaration |
14:27:05 | FromDiscord | <lqdev> it's also initialization for seqs |
14:27:11 | FromDiscord | <XxDiCaprioxX> oh okay thanks |
14:27:20 | FromDiscord | <lqdev> seqs are empty by default, there is no nil seq |
14:27:33 | FromDiscord | <XxDiCaprioxX> okay |
14:28:00 | FromDiscord | <Vindaar> if you want to do it explicitly though, you do `var x = newSeq[string]()` |
14:28:25 | FromDiscord | <XxDiCaprioxX> wont be necessary but still thank you |
14:28:48 | FromDiscord | <Recruit_main707> or if you want to specify an initial length |
14:28:55 | FromDiscord | <Vindaar> ^this |
14:29:28 | FromDiscord | <XxDiCaprioxX> alright thank you |
14:31:09 | FromGitter | <alehander92> var x: seq[string] = @[] |
14:31:11 | FromGitter | <alehander92> as well |
14:31:19 | FromGitter | <alehander92> but you don't need the `= @[]` thing here |
14:31:29 | FromGitter | <alehander92> as it's default |
14:31:52 | FromGitter | <alehander92> same for tables iirc |
14:32:03 | FromGitter | <alehander92> (you can not explicitly init them now) |
14:32:18 | FromGitter | <alehander92> (you can, but it's optional* ) |
14:51:53 | FromDiscord | <XxDiCaprioxX> in nim the index of the first element of a seq is 0, correct? |
14:55:14 | FromDiscord | <Clyybber> yeah |
14:55:22 | FromDiscord | <XxDiCaprioxX> okay good thanks |
14:57:30 | FromDiscord | <XxDiCaprioxX> can a proc return multiple things? like `proc foo(): string, int =` |
14:58:10 | FromDiscord | <XxDiCaprioxX> actually nevermind |
14:58:36 | FromDiscord | <Vindaar> nvm because you realize it can by returning a tuple? |
15:08:49 | * | thomasross joined #nim |
15:14:56 | * | a_chou joined #nim |
15:19:30 | FromGitter | <alehander92> hm Clyybber |
15:19:32 | FromGitter | <alehander92> i have a problem |
15:19:47 | FromGitter | <alehander92> if I have a warning that i want to test it *does not* appear |
15:19:57 | FromGitter | <alehander92> how do people usually do it in tests here |
15:20:08 | FromGitter | <alehander92> as it seems it's ok to have a lot of additional output |
15:20:29 | FromGitter | <alehander92> it's enough to somehow say "no warning for line x" |
15:20:44 | FromGitter | <alehander92> maybe #[tt.Ok]# Araq? |
15:21:34 | FromDiscord | <ThothLoki> is there a good way to make sure only and int is put into a textbox? (using nigui) |
15:22:45 | disruptek | alehander92: make warnings errors? |
15:24:00 | FromDiscord | <ThothLoki> an i can do that, but say i put in a `5` and have a button next to it to increase it, i want to take that `5` (which is a string, make it an int, add `1` to it then set the textbox to the new value `6` |
15:24:18 | disruptek | you're blowin' my mind right now. |
15:24:34 | FromGitter | <alehander92> disruptek no what i mean |
15:24:39 | FromDiscord | <XxDiCaprioxX> > nvm because you realize it can by returning a tuple?↵@Vindaar no cuz I found out I don't need it |
15:24:48 | FromGitter | <alehander92> how can i test for absense of error? |
15:24:52 | FromGitter | <alehander92> / warning |
15:25:27 | FromDiscord | <XxDiCaprioxX> what would be the long form for `-d:ssl` and is there any reason I should use one of either in my nim.cfg file? |
15:25:41 | FromDiscord | <XxDiCaprioxX> Like should I rather use `-d:ssl` or the other one? |
15:26:00 | FromDiscord | <XxDiCaprioxX> (edit) 'for' => 'of' |
15:26:23 | FromGitter | <alehander92> ThothLoki sorry not sure about it |
15:27:13 | FromGitter | <alehander92> and actually |
15:27:25 | FromGitter | <alehander92> is there a reason `T nil` is assignable to `T` |
15:27:37 | FromGitter | <alehander92> shouldn't we just change it in sem checking |
15:27:55 | FromGitter | <alehander92> or is it not cool to do so for type flags |
15:29:40 | disruptek | alehander92: just use the warnings-are-errors option and then your test will fail if it warns. |
15:30:20 | FromGitter | <alehander92> but I don't want them to fail |
15:30:26 | FromGitter | <alehander92> as I have a single file with many tests |
15:30:39 | FromGitter | <alehander92> hm, so what you mean is to move the cases without warning into another test file |
15:30:51 | disruptek | just move the test-for-no-warning to another file. |
15:30:55 | FromGitter | <alehander92> hacky but maybe makes sense |
15:31:16 | disruptek | have you met the compiler code yet? |
15:40:59 | FromGitter | <alehander92> it's not so bad |
15:41:06 | FromGitter | <alehander92> have you met my code |
15:43:33 | * | leorize quit (Remote host closed the connection) |
15:43:59 | * | leorize joined #nim |
15:45:16 | Araq | alehander92: 'nim check' continues after an error so you can use --warningAsError |
15:45:42 | FromDiscord | <InventorMatt> @ThothLoki you'll need to have a proc that checks the input each time to see if it is a number and if it isn't a number throw a warning message or revert back to the last accurate value |
15:46:05 | FromGitter | <alehander92> Araq yes. but this is the opposite case: I do want to ensure no warnings happen, so disruptek suggestion is good as well |
15:46:13 | FromGitter | <alehander92> if i fail on error |
15:46:22 | FromGitter | <alehander92> btw your last review point |
15:46:38 | FromGitter | <alehander92> basically i think it's more general: `a = b` currently doesn't check deep nilability |
15:46:54 | FromGitter | <alehander92> i think this is similar to requiresInit's logic somehow |
15:47:16 | FromGitter | <alehander92> but i have to yet look at requiresInit internally |
15:47:45 | FromGitter | <alehander92> so what I asked is: can't we just forbit a not nil sem matching a nil |
15:47:53 | FromGitter | <alehander92> and require an explicit type convertion |
15:48:13 | FromGitter | <alehander92> (only in the nil->notnil direction) |
15:48:25 | FromGitter | <alehander92> instead of handling it inside the flow checker |
15:49:05 | Araq | well I have nothing to add |
15:49:26 | Araq | if 'result' is marked with "requires init" you need to check all paths do init it |
15:49:50 | Araq | your version only deals with 'tyRef', that's insufficient |
15:50:29 | FromGitter | <alehander92> so this requiresInit mechanism checking all paths: is it existant in the compiler |
15:50:37 | * | Kaivo quit (Ping timeout: 264 seconds) |
15:51:21 | Araq | then your code is superfluous |
15:51:24 | FromGitter | <alehander92> what i mean is more subtle: the problem with my version is , why should `(aNon, bNon) = (aNilable, bNilable)` pass the previous semcheck at all |
15:51:46 | FromGitter | <alehander92> NonNilables are subtype of nilables |
15:52:19 | Araq | I dunno why it "should pass" but either way your solution is incomplete or inconsistent |
15:52:39 | * | Kaivo joined #nim |
15:52:43 | Araq | look, I don't have to understand the problem to point out the obviously wrong special case in your code |
15:53:16 | FromGitter | <alehander92> no i completely agree it's a wrong case |
15:53:25 | FromGitter | <alehander92> what i mean is |
15:53:39 | FromGitter | <alehander92> the same way sempass stops a: Inherited = Base() |
15:54:35 | FromGitter | <alehander92> can't I reuse that to stop nonnilables = Nilable() |
15:54:54 | FromGitter | <alehander92> because it already works recursively |
15:57:24 | FromDiscord | <ThothLoki> @InventorMatt i agree. but a textbox is by default a string. i need to conveert it to an int first too checkk it |
15:58:04 | FromDiscord | <ThothLoki> i am pretty dang new to nim so how would i go about converting a string to an int and back again? |
15:58:34 | Araq | $x # toString |
15:58:42 | Araq | parseInt(x) # to int |
15:59:04 | Araq | alehander92: well, I don't know. maybe fix the old code so that it works for your case too |
16:00:45 | * | a_chou quit (Ping timeout: 240 seconds) |
16:01:10 | FromGitter | <alehander92> but yeah it wouldn't take branches into account |
16:02:37 | FromGitter | <alehander92> but the problem is |
16:02:49 | FromGitter | <alehander92> e.g. if you write mapSafe |
16:02:53 | FromDiscord | <ThothLoki> Thanks Araq. Do I need to import something to use that? |
16:03:03 | FromGitter | <alehander92> which takes seq[Nilable] and just iterates and makes a[i] NonNilable |
16:03:50 | FromGitter | <alehander92> result[i]* it's very hard to prove result[$any] is Safe |
16:04:30 | * | natrys joined #nim |
16:05:00 | FromGitter | <alehander92> so the tuple argument is easy, but the general case requires super general expr support |
16:05:18 | * | hnOsmium0001 joined #nim |
16:05:44 | FromDiscord | <InventorMatt> @ThothLoki you'll need to import parseutils for parseint |
16:05:59 | Araq | or strutils |
16:06:22 | FromDiscord | <ThothLoki> Lol. Just found that. Thanks |
16:07:05 | FromDiscord | <ThothLoki> Figure I would TRY to do some of my own research. Just asked the question before I got that bright idea |
16:11:11 | * | awe002 joined #nim |
16:13:54 | * | awe001 quit (Ping timeout: 256 seconds) |
16:20:26 | * | rockcavera joined #nim |
16:22:51 | * | endragor_ joined #nim |
16:22:51 | * | endragor quit (Read error: Connection reset by peer) |
16:24:59 | FromDiscord | <PizzaFox> how can i cast `seq[TaintedString]` to `seq[string]` |
16:25:03 | disruptek | lol |
16:25:32 | FromDiscord | <mratsim> (seq[string])(mySeq) |
16:25:44 | FromDiscord | <PizzaFox> is this true |
16:25:53 | FromDiscord | <mratsim> why wouldn't it be? |
16:25:59 | FromDiscord | <PizzaFox> idk sometimes people make mistakes |
16:26:09 | FromDiscord | <Reki> if you dont know what a TaintedString is just pretend its a string |
16:26:12 | FromDiscord | <Reki> 🙂 |
16:26:15 | FromDiscord | <PizzaFox> i know what it is |
16:26:17 | FromGitter | <alehander92> Araq thanks for the hint tho |
16:26:27 | FromDiscord | <PizzaFox> i also know my input is getting passed to a parser |
16:26:30 | FromDiscord | <PizzaFox> and the parser does the validation |
16:26:31 | FromDiscord | <PizzaFox> to untaint it |
16:26:39 | FromGitter | <alehander92> we need to just check ltype rtype in assignments |
16:26:50 | FromDiscord | <PizzaFox> (edit) 'to untaint it ... ' => 'to untaint itso i just need the compiler to allow me to pass the tainted string into parseopt' |
16:27:09 | FromDiscord | <mratsim> example to de-distinct a distinct seq: https://github.com/mratsim/number-theory/blob/master/src/primes.nim#L10-L18 |
16:30:23 | FromGitter | <alehander92> ah |
16:30:42 | FromGitter | <alehander92> ok so we need to just generate Nil for unitiliazed |
16:30:55 | FromGitter | <alehander92> uninitialized expr-s |
16:31:17 | FromGitter | <alehander92> `result` or `var a: T` with internal non-nilable fields |
16:32:18 | FromGitter | <alehander92> but this also applies to `var a = A() # no b passed because return a.b` |
16:32:53 | FromGitter | <alehander92> ugh but this duplicates too much of obj constr |
16:33:27 | FromGitter | <alehander92> maybe warning for uninit fields/vars + just simple nilable field = non warning |
16:33:28 | FromGitter | <alehander92> are enough |
16:34:07 | FromGitter | <alehander92> without tracking all the possible paths for each which would be a lot |
16:34:24 | * | a_chou joined #nim |
16:45:24 | FromDiscord | <ThothLoki> ok, i can convert a string into an int, now how do i convert an int into a string? ↵would i just use the `intoToStr()` method? |
16:46:39 | * | awe002 quit (Ping timeout: 260 seconds) |
16:47:11 | * | abm joined #nim |
16:49:11 | FromDiscord | <Reki> you can do $myInt |
16:49:32 | * | JustASlacker quit (Ping timeout: 256 seconds) |
16:49:42 | * | Trustable joined #nim |
16:49:43 | Araq | please read one of our tutorials |
16:49:46 | * | konkrrrrrr joined #nim |
16:49:54 | * | kinkinkijkin quit (Read error: Connection reset by peer) |
16:51:29 | FromDiscord | <ThothLoki> ok. will do |
16:52:36 | FromGitter | <alehander92> i will just plan this, add a test case and discuss it tomorrow |
16:58:52 | * | narimiran joined #nim |
17:03:47 | FromGitter | <alehander92> i love you disruptek this test idea works greatly |
17:06:49 | * | konkrrrrrr is now known as kinkinkijkin |
17:14:12 | * | endragor_ quit (Quit: Leaving...) |
17:17:35 | FromDiscord | <Avatarfighter> all the homies love disruptek |
17:17:48 | FromDiscord | <Avatarfighter> what’s good everyone what are you all working on today? |
17:18:17 | FromDiscord | <mratsim> crashing elegantly |
17:18:30 | FromDiscord | <Avatarfighter> how is that going for you mratsim? |
17:18:41 | FromDiscord | <mratsim> still a mess :p |
17:18:43 | FromDiscord | <Avatarfighter> ahhaah |
17:18:51 | * | solitudesf- quit (Remote host closed the connection) |
17:19:07 | FromDiscord | <Avatarfighter> crashing with fire and destruction still ? 😛 |
17:19:18 | FromDiscord | <mratsim> Well I'm joking, i'm waiting for CI |
17:19:33 | FromDiscord | <mratsim> Azure windows 64-bit is now slower than Azure 32-bit ... |
17:19:48 | FromDiscord | <mratsim> and both are slower than Travis even though they used to be way faster |
17:20:01 | FromDiscord | <mratsim> and Github actions that uses the same infra is faster than everything |
17:20:12 | FromDiscord | <Avatarfighter> i wish i could help on CI i feel comfortable enough with nim that I think I could help but i wouldn’t know what to do |
17:20:13 | * | lritter joined #nim |
17:20:21 | FromDiscord | <mratsim> Spray and pray |
17:20:33 | FromDiscord | <Avatarfighter> I meant IC |
17:20:34 | FromDiscord | <mratsim> you open a PR and you push commit until something sticks |
17:21:10 | FromDiscord | <Avatarfighter> Have you tried spinning up AWS instances for compiling mratsim? |
17:21:44 | FromDiscord | <Avatarfighter> i get better performance on AWS than GC/Azure |
17:28:12 | FromDiscord | <mratsim> we have some already |
17:28:20 | FromDiscord | <mratsim> yes they are faster |
17:30:24 | disruptek | even if ic was ready, i doubt status would use it. |
17:32:15 | Araq | disruptek, so what, everybody needs it |
17:32:27 | disruptek | no one needs it. |
17:32:47 | disruptek | see, we can both make assertions. |
17:32:52 | FromGitter | <alehander92> the compiler needs it imho |
17:32:59 | disruptek | based upon what? |
17:33:05 | FromGitter | <alehander92> it would be cool to just immediately recompile what i work on |
17:33:15 | FromGitter | <alehander92> well upon my experienc |
17:33:28 | FromGitter | <alehander92> with my previous nim project and the compiler |
17:33:46 | narimiran | Araq: with disruptek you have to play this "reverse psychology" game. so for the next time, please say: "baaah, nobody needs IC" |
17:34:34 | disruptek | it's pointless to even talk about. |
17:35:06 | Zevv | I think disruptek is kind of done |
17:36:20 | Zevv | maybe someone can bribe him for, let's say, a few k$/month |
17:36:31 | disruptek | araq would be the first to admit that having a super fast compiler changes nothing. |
17:37:04 | Araq | sure, depending on my mood I can argue/admit anything |
17:37:18 | Araq | no shut up please, cannot imagine a less productive conversation |
17:37:26 | Araq | *now |
17:38:05 | * | a_chou quit (Ping timeout: 272 seconds) |
17:38:17 | FromGitter | <alehander92> it's obvious that a faster compiler is cool |
17:38:24 | FromDiscord | <Avatarfighter> ahah |
17:38:36 | FromGitter | <alehander92> if this is a top priority is another question but like guys come on |
17:38:46 | FromGitter | <alehander92> next thing you'll say is you finally agree with me that electron is ok |
17:39:30 | disruptek | depending on my mood i can argue/admit anything. |
17:39:53 | FromDiscord | <Avatarfighter> alehander92: what do you mean electron is ok |
17:40:11 | FromDiscord | <Avatarfighter> its not ok, its \exceptional\ |
17:40:50 | FromGitter | <alehander92> ok guys awesome |
17:41:29 | FromDiscord | <Avatarfighter> disruptek: i got my memory usage to sub gigabyte now 🙂 |
17:41:55 | FromDiscord | <mratsim> It's important for us. Our build times are getting larger. |
17:42:14 | disruptek | just not important enough to pay for. |
17:42:21 | FromDiscord | <mratsim> Even more important when we test on a Rpi4 |
17:42:56 | FromDiscord | <mratsim> Uh what? we are funding Nim 10k+/months and reviewed the Nim 2020 roadmap with Araq a couple of months ago |
17:43:43 | FromDiscord | <mratsim> There are 4 items: https://github.com/nim-lang/RFCs/milestone/1 |
17:43:53 | FromDiscord | <mratsim> Incremental COmpilation is one of those |
17:49:14 | FromDiscord | <Recruit_main707> i dont like var T as a type, id rather just have automatic dereferencing, and deprecating all the gcs is not my favourite idea either :/ |
17:52:09 | Araq | mratsim: exactly |
17:52:59 | FromDiscord | <Avatarfighter> I have a question because I'm curious now, how does IC work? Is it just compile the source files that have a change then feed the output files to whatever system compiles ? |
17:53:44 | Araq | kind of |
17:54:33 | FromDiscord | <Avatarfighter> That's what I'm understanding atm, wouldn't a naïve approach be remember the contents of the source file via a hash or checksum, store that in nimcache then when you build check the files against their hash if it changed compile only that file? |
17:54:50 | FromDiscord | <Avatarfighter> Forgive me if that is a super naïve approach, its probably wrong or there are better way |
17:54:53 | FromDiscord | <Avatarfighter> ways* |
17:55:41 | Araq | do you really think the problem is in figuring out which file was changed during the last compiler run? |
17:55:46 | FromDiscord | <Avatarfighter> nope |
17:55:56 | Araq | good |
17:56:00 | Araq | so what is your question |
17:56:09 | FromDiscord | <Avatarfighter> I actually am curious to know how IC works, that was what I was asking |
17:56:18 | FromDiscord | <Avatarfighter> I was wondering if I had the general idea |
17:57:03 | Araq | Recruit_main707: I'm updating this plan but in the end, we need fewer GCs |
17:57:40 | * | a_chou joined #nim |
18:01:45 | FromDiscord | <dom96> https://discord.gg/nim 😄 |
18:02:47 | FromDiscord | <Recruit_main707> > Recruit_main707: I'm updating this plan but in the end, we need fewer GCs↵yeah, thats true |
18:03:05 | FromDiscord | <Avatarfighter> dom96: I'm actually perplexed you dont have the cool partner badge 😦 |
18:03:12 | FromDiscord | <Avatarfighter> I thought you would've gotten it ahah |
18:05:23 | FromDiscord | <Recruit_main707> im happy to hear you are updating the plan though |
18:08:20 | FromGitter | <alehander92> Avatarfighter search a bit the logs from today or yesterday |
18:08:27 | FromGitter | <alehander92> disruptek had explained his approach |
18:08:56 | FromDiscord | <Avatarfighter> I'll do that, thanks alehander |
18:13:27 | * | femtotones is now known as femtotones|away |
18:13:28 | FromDiscord | <Avatarfighter> oh god the irc logs have some gems |
18:13:40 | FromDiscord | <Avatarfighter> "16:31:34 Prestige disruptek: pee in their rosebushes" |
18:13:53 | * | solitudesf joined #nim |
18:13:54 | * | Prestige hides |
18:15:57 | FromDiscord | <krisppurg> Eyyyy nim got verified |
18:17:17 | FromDiscord | <ache of head> lmao, you must be the 6th person noticing this |
18:17:33 | FromDiscord | <ache of head> still i love how everyone is excited about this |
18:19:04 | FromDiscord | <Clyybber> Araq: WDYT about making the sink param copy warnings just hints and disabling them by default? |
18:19:24 | Araq | nah, they are nice |
18:19:42 | * | arecacea1 quit (Remote host closed the connection) |
18:20:06 | * | arecacea1 joined #nim |
18:23:59 | FromDiscord | <dom96> @Avatarfighter 😢 |
18:25:15 | * | JustASlacker joined #nim |
18:30:39 | FromDiscord | <Clyybber> Araq @cooldome Can we revert https://github.com/nim-lang/Nim/pull/15330#event-3773794794 until 1.4 is released, so that we don't have to commit to this design yet? |
18:30:40 | disbot | ➥ Introduce explicit copy |
18:32:50 | shashlick | requesting feedback - https://gist.github.com/genotrance/469a590858cde5c91005aafc8bbcfe81 - nimble specific |
18:38:03 | * | gmaggior joined #nim |
18:41:08 | FromDiscord | <Clyybber> shashlick: Will nimble init -l work too? |
18:41:16 | FromDiscord | <Clyybber> I think it makes more sense than nimble -l init |
18:43:45 | * | Zectbumo joined #nim |
18:49:30 | FromDiscord | <mbenam> Hey all, how do I write the following python equivalent? |
18:49:41 | FromDiscord | <mbenam> ```sock.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, mreq)``` |
18:49:51 | * | a_chou quit (Remote host closed the connection) |
18:50:00 | FromDiscord | <mbenam> Seems like those constants are not defined. |
18:50:08 | * | a_chou joined #nim |
18:59:48 | FromDiscord | <mbenam> And setSockOpt is limited to fewer options. Am I correct? |
19:06:18 | * | arecacea1 quit (Remote host closed the connection) |
19:06:42 | * | bung joined #nim |
19:07:09 | * | JustASlacker quit (Ping timeout: 265 seconds) |
19:07:37 | * | arecacea1 joined #nim |
19:10:31 | * | gmaggior quit (Ping timeout: 246 seconds) |
19:14:27 | * | femtotones|away quit (Quit: Default Quit Message) |
19:17:01 | FromDiscord | <ShalokShalom> Is func already pure in any case? |
19:18:00 | FromDiscord | <haxscramper> Yes. No side effects, and with steuctFuncs you also get deep immutability for red types |
19:18:55 | FromDiscord | <haxscramper> ref* . https://nim-lang.org/araq/writetracking_2.html |
19:21:09 | shashlick | @Clyybber - yes both will work |
19:24:26 | * | gmaggior joined #nim |
19:26:53 | Araq | mbenam: import posix or the net module |
19:36:23 | FromDiscord | <mbenam> Araq: I looked at the net module. Went thru the documentation. The setSockOpt does seem to me is limited to few options. At least as far as I can understand. Will look at posix now. |
19:38:22 | Araq | usually the few options are a result of portability |
19:38:39 | Araq | so if you need more than that, posix.nim is required |
19:41:35 | FromDiscord | <UNIcodeX> What's the recommended way to find the path to a shared library? |
19:43:25 | FromDiscord | <lqdev> why? |
19:43:37 | FromDiscord | <lqdev> do you want to load a shared library? |
19:44:49 | FromDiscord | <UNIcodeX> I'm using Nimpy to load a small bit of functionality from a python environment. I need to set the path to the `libpython#.#.so` file. This works in testing when I set it statically, but I'd like ideally to find it because the path to the virtual env will probably change |
19:45:37 | FromDiscord | <lqdev> if virtualenv sets the PATH to contain the folder in which libpython.so is contained, it should work out of the box |
19:45:51 | FromDiscord | <lqdev> that's how libdl works. |
19:46:25 | FromDiscord | <UNIcodeX> There is an open issue for Nimpy outlining why exactly this step is necessary for a Python virtualenv. I read it a week or so ago, so I don't remember the details. |
19:46:35 | FromDiscord | <mbenam> OK, this is great. Looking at posix now. When I import it, I get an error No such file or directory↵ #include <sys/socket.h>. It's an issue with MingW. Any suggestion how to fix it? |
19:49:39 | Araq | well Windows is not posix |
19:49:58 | Araq | import winlean instead |
19:51:09 | FromDiscord | <mbenam> ha ha ... it's the work pc. OK will try on the mac. Thanks. |
19:53:03 | * | JustASlacker joined #nim |
19:53:26 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2xNj |
19:53:51 | FromDiscord | <lqdev> dude what |
19:54:14 | FromDiscord | <ache of head> mmmmm |
19:54:29 | FromDiscord | <ache of head> ah |
19:54:31 | FromDiscord | <ache of head> beautiful |
19:54:38 | FromDiscord | <haxscramper> It cannot parse `‖` as braces of course, but otherwise it works |
19:55:09 | * | natrys quit (Quit: natrys) |
19:56:45 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2xNk |
19:57:10 | * | cyraxjoe quit (Quit: No Ping reply in 180 seconds.) |
19:57:33 | * | Plazma joined #nim |
19:59:39 | * | cyraxjoe joined #nim |
20:00:02 | FromDiscord | <haxscramper> Comment hack is actually not necessary either - https://play.nim-lang.org/#ix=2xNm |
20:00:19 | * | a_chou quit (Ping timeout: 260 seconds) |
20:09:33 | FromDiscord | <dayl1ght> is gc:arc supposed to work with all nim programs? |
20:09:42 | FromDiscord | <dayl1ght> (edit) 'gc:arc' => '`--gc:arc`' |
20:09:53 | FromGitter | <deech> Are source filters considered a stable feature? They seem to work fine now but are there any plans to remove them? |
20:10:44 | FromDiscord | <dayl1ght> I have a program using raw pointers that gives me incorrect results when using `gc:arc` |
20:12:02 | FromDiscord | <juan_carlos> SCF are really stable. |
20:12:50 | Araq | dayl1ght: most of the time arc exposes existing bugs, compile with -d:useMalloc --gc:arc and ask valgrind about it |
20:13:56 | * | NimBot joined #nim |
20:14:22 | * | Vladar quit (Quit: Leaving) |
20:17:48 | * | JustASlacker quit (Ping timeout: 272 seconds) |
20:20:25 | * | paulmr joined #nim |
20:22:58 | * | a_chou joined #nim |
20:23:48 | * | livcd quit (Ping timeout: 256 seconds) |
20:26:03 | * | narimiran quit (Quit: leaving) |
20:27:55 | FromDiscord | <Clyybber> Araq, disruptek: Please take a look at telegram |
20:30:59 | * | livcd joined #nim |
20:37:44 | * | aenesidemus_ joined #nim |
20:41:51 | * | aenesidemus quit (Ping timeout: 260 seconds) |
20:42:06 | * | aenesidemus joined #nim |
20:42:19 | * | aenesidemus_ quit (Ping timeout: 260 seconds) |
20:51:53 | * | gmaggior quit (Ping timeout: 272 seconds) |
20:54:27 | * | lritter quit (Ping timeout: 265 seconds) |
20:58:04 | * | solitudesf quit (Ping timeout: 260 seconds) |
21:00:24 | * | lritter joined #nim |
21:05:08 | * | gmaggior joined #nim |
21:15:00 | * | a_chou quit (Quit: a_chou) |
21:42:06 | * | krux02 quit (Remote host closed the connection) |
21:50:29 | * | paulmr quit (Ping timeout: 246 seconds) |
21:53:47 | * | gmaggior quit (Ping timeout: 258 seconds) |
22:06:02 | * | gmaggior joined #nim |
22:29:09 | voidpi | was it here where someone mentioned a cheap romanian vps provider? |
22:42:09 | * | femtotones|away joined #nim |
22:50:07 | FromDiscord | <Elegant Beef> Voidpi think @Avatarfighter mentioned it |
22:50:57 | FromDiscord | <Avatarfighter> @Elegant Beef what got mentioned? |
22:51:19 | FromDiscord | <Elegant Beef> *Read a message above* |
22:51:28 | FromDiscord | <Avatarfighter> i cant read |
22:51:35 | FromDiscord | <Elegant Beef> I can tell |
22:51:38 | FromDiscord | <Avatarfighter> voipi: https://secure.hostsolutions.ro/ |
22:51:40 | FromDiscord | <Rika> lol |
22:51:51 | FromDiscord | <Avatarfighter> did i tell u guys i got my memory usage sub-gigabyte |
22:52:14 | FromDiscord | <Rika> did you finally use critbit |
22:52:21 | FromDiscord | <Avatarfighter> yeah lol |
22:53:25 | FromDiscord | <Avatarfighter> I also figured out an efficient way of scraping the site I wanted so I can remove a bunch of urls from my list because I don't need them |
22:54:04 | FromDiscord | <Elegant Beef> how about your storage usage? |
22:54:15 | FromDiscord | <Avatarfighter> we can ignore that for a second |
22:54:18 | FromDiscord | <Avatarfighter> baby steps |
22:54:36 | FromDiscord | <Avatarfighter> I'l like |
22:54:38 | FromDiscord | <Avatarfighter> oh my |
22:55:20 | FromDiscord | <Avatarfighter> Its using more than I would like but I need to limit myself to a GiB max to not kill the OS i'm going to use |
22:55:38 | FromDiscord | <Avatarfighter> I'm probably going to do 10GiB total though because 3GiB is basically impossible |
23:00:45 | voidpi | thanks avatar |
23:18:14 | * | abm quit (Read error: Connection reset by peer) |
23:21:40 | * | Cthalupa quit (Ping timeout: 256 seconds) |
23:24:21 | * | Cthalupa joined #nim |