<< 03-07-2020 >>

00:00:20*NimBot joined #nim
00:20:01*endragor joined #nim
00:24:14*endragor quit (Ping timeout: 240 seconds)
00:39:07FromGitter<ynfle> When is `bindsym` needed?
00:53:12FromDiscord<Yardanico> When you want to use some symbol from the module you imported in your macro, but don't want the user to have to import that module as well
00:53:41FromGitter<ynfle> Ohh
00:53:46FromGitter<ynfle> That makes sense!!! Thanks
00:54:05FromDiscord<Yardanico> E.g. you can do that for strutils.format, use it in your macro, and when that macro is called from another module you won't need to import strutils three
00:54:10FromDiscord<Yardanico> (edit) 'three' => 'there'
00:56:44FromDiscord<Yardanico> There's also bind useful in templates usually
00:57:08FromDiscord<Yardanico> and mixin for templates/generic procs (if I'm not mistaken)
00:57:57FromDiscord<Yardanico> https://nim-lang.org/docs/manual.html#generics-mixin-statement and https://nim-lang.org/docs/manual.html#generics-bind-statement
00:58:00*axion joined #nim
01:00:43*endragor joined #nim
01:01:02*axion left #nim (#nim)
01:06:03*audiophile joined #nim
01:13:18*MortS joined #nim
01:21:25*MortS left #nim ("Leaving")
01:24:35FromDiscord<Zachary Carter> should the dynlib pragma be used with importcpp?
01:24:50FromDiscord<Zachary Carter> I want to statically link a C++ lib but I'm not sure how...
01:25:07FromDiscord<Zachary Carter> when I use the dynlib pragma I get an invalid pragma error
01:25:16FromDiscord<Yardanico> I don't think you need dynlib when statically linking at all?
01:25:46FromDiscord<Zachary Carter> well for importc I think the pattern is to use the dynlib pragma and then dynlibOverride
01:26:07FromDiscord<Zachary Carter> but apparently this doesn't work the same for importcpp
01:27:22FromDiscord<Yardanico> ah
01:27:29*MortS joined #nim
01:27:42*oddp quit (Ping timeout: 256 seconds)
01:29:58*endragor quit (Ping timeout: 244 seconds)
01:33:35*lritter quit (Quit: Leaving)
01:40:27FromDiscord<Zachary Carter> ah my error was caused by something else - I can just passC the static library and it works
01:44:26*chemist69 quit (Ping timeout: 244 seconds)
01:46:36*chemist69 joined #nim
01:47:10disruptekwe can't do this unix file permissions stuff by simply casting the set?
01:50:51*B4s1l3 joined #nim
01:51:26*opDispatch quit (Ping timeout: 260 seconds)
01:56:42*endragor joined #nim
01:57:40*vr0n joined #nim
01:58:41*arecaceae quit (Remote host closed the connection)
01:59:04*arecaceae joined #nim
02:16:55*MortS quit (Quit: Leaving)
02:19:06*sagax joined #nim
02:33:01*nikita_ joined #nim
02:35:09*muffindrake quit (Ping timeout: 272 seconds)
02:35:37*nikita` quit (Ping timeout: 264 seconds)
02:36:35*thomasross quit (Ping timeout: 256 seconds)
02:36:51*muffindrake joined #nim
02:40:29leorizedisruptek: we can, just unsafe since the semantics of casting to set[T] is not fully specified
02:40:57disruptekwhich part isn't specified?
02:41:07leorizethe casting without knowing the size part
02:41:26leorizes/knowing/specifying/
02:41:26disruptekdon't we know the size of file permission bitsets?
02:41:50leorizethe manual only guarantee the behavior if you have `{.size: sizeof(cint).}`
02:42:00disruptekso put that in?
02:42:19disrupteki guess i don't see what the problem is.
02:49:49disruptek!rfc ==
02:49:49disbotno results 😢
03:11:15FromGitter<Knaque> What would be the easiest way of being able to use the Parsecfg module on a string?
03:13:11FromDiscord<juan_carlos> `loadConfig` takes a string Stream.
03:31:29*aeldemeryde[m] joined #nim
03:43:42*rockcavera quit (Remote host closed the connection)
03:45:54*pietroppeter joined #nim
03:46:38*chemist69 quit (Remote host closed the connection)
03:47:01*chemist69 joined #nim
03:47:59*vr0n quit (Ping timeout: 256 seconds)
03:49:00*waleee-cl quit (Quit: Connection closed for inactivity)
03:53:51*notandinus quit (Quit: be back in a minute)
03:54:39*team\andinus joined #nim
03:55:58FromGitter<ynfle> If I wanna use my own type for a `Table` does it have to be `distinct string` for example?
03:56:13disrupteknah.
03:56:23*team\andinus is now known as notandinus
03:56:25FromGitter<ynfle> Otherwise the calls are ambiguous for `==` and `hash`
03:57:21disruptekyou don't need to reimplement `==`() or hash() for strings and implementations are already provided.
03:57:44FromGitter<ynfle> I want it to be different
03:58:18FromGitter<ynfle> ie. I want to use my own `==` and `hash`
03:59:16disruptekthen you need to use a distinct string.
03:59:43disrupteksee also the strtabs module.
03:59:51FromGitter<ynfle> Ya
04:00:59FromGitter<ynfle> I want to have a table that would function to compare nim ident. So the first letter matters by the rest don't for style.
04:01:13FromGitter<ynfle> `strtabs` doesn't have that
04:01:34disruptekof course it does.
04:01:57disruptekhttps://nim-lang.github.io/Nim/strtabs#StringTableMode
04:02:40FromGitter<ynfle> StyleInsensitive means even the first letter iirc
04:04:10disruptekyou might be right.
04:04:29disruptekthat means nimph has at least one bug.
04:05:01FromGitter<ynfle> 1) 2.4 has strutils methods for this
04:06:01*supakeen quit (Quit: WeeChat 2.8)
04:06:33*marnix__ joined #nim
04:06:40*supakeen joined #nim
04:07:06FromGitter<ynfle> https://nim-lang.github.io/Nim/strutils#nimIdentNormalize%2Cstring
04:18:23FromGitter<ynfle> https://play.nim-lang.org/#ix=2qKk Any idea why i'm getting this error `Error: no symbol to borrow from found`?
04:25:26FromGitter<bung87> means nothing to borrow
04:32:53FromGitter<ynfle> I know but why not?
04:33:04FromGitter<ynfle> Did you see the code snippet?
04:34:40FromGitter<bung87> I checked but am not sure the signature will match the string's as you expect
04:34:59FromGitter<ynfle> Why not? How would I change it?
04:38:53FromGitter<bung87> https://github.com/nim-lang/Nim/blob/devel/lib/system/sysstr.nim no procs like that , see
04:40:04*aeldemeryde[m] left #nim ("User left")
04:40:38FromGitter<ynfle> I don't get it
04:44:53FromGitter<bung87> no procs like that you intend to borrow ,from what I understanding
04:46:38FromGitter<ynfle> What are the rules for borrowing?
04:46:57FromGitter<ynfle> Are you pointing to a specific line in `sysstr.nim`
04:48:59FromDiscord<Technisha Circuit> How do i join a path in Nim?
04:49:17FromGitter<bung87> borrow procs from existed procs of a Type
04:49:21FromDiscord<Technisha Circuit> For a file location
04:50:24FromGitter<bung87> `/` ?
04:50:25FromGitter<ynfle> I think it's just `/`
04:50:42FromGitter<ynfle> @bung87 look in `system.in`
04:51:00FromGitter<ynfle> https://github.com/nim-lang/Nim/blob/version-1-2/lib/system.nim#L2426
04:51:09FromDiscord<Elegant Beef> I'd say use https://nim-lang.org/docs/os.html#joinPath%2Cstring%2Cstring
04:52:19FromGitter<bung87> ah , it's in system.nim , not proc , a template
04:52:30FromGitter<ynfle> Can't borrow from templates?
04:53:15FromGitter<bung87> I havn't try borrow templates
04:56:08*marnix joined #nim
04:56:12shashlickwho wants a wrapper for a C library - want a filler exercise
04:57:14leorizeshashlick: you can try nghttp2 :)
05:00:03shashlickalready done before
05:02:44FromGitter<ynfle> If you want a challenge try TensorFlow
05:03:04leorizethat thing has a C API?
05:03:16*wgetch quit (Quit: Bye bye for now)
05:04:01shashlickhttps://github.com/tensorflow/tensorflow/blob/master/tensorflow/c/c_api.h
05:04:19leorizeI'd be thrilled if you can completely wrap Qt, but that's not C :P
05:05:41FromGitter<ynfle> TensorFlow is a c library with python API
05:06:31FromGitter<ynfle> iirc
05:06:39leorizeone of the thing I'd like to see solved is a better {.dynlib.} implementation
05:07:25shashlickthe one we discussed?
05:07:30leorizeyea
05:07:49leorizemaybe call it {.lazylib.} :P
05:08:17shashlicki've been wondering about doing it but its yet another option and i don't know if users already understand the variety let alone another one
05:08:45leorizeyou can implement it as a macro and contribute that to nim-fusion
05:09:55leorizedoesn't have to be nimterop specific, I can use that to deprecate the need of `-d:ssl` in nim :)
05:10:10leorizeinstead I can lazy load ssl stuff as needed and if I can't I just throw an error
05:14:43shashlickI think you understand that a lot better than I do
05:16:10bung_I'd like to see a js engine wrapper
05:16:23shashlickduktape wrapper already exists
05:16:32shashlickhttps://gist.github.com/genotrance/51702ec94efcf7151b3d253600f6be22
05:17:48shashlickI had also worked on a quickjs wrapper
05:23:37bung_thanks ! is quickjs wrapper done?
05:25:22shashlicklet me see where i left it
05:26:24leorizeshashlick: or you can try this for a big challenge: make cmake, meson, etc. understands how to build Nim
05:27:05leorizethen we can fuse other cmake/meson-based stuff with Nim
05:27:42leorizethe compiler is cool and all, but it's not even close to what specialized builders can do :)
05:29:47shashlickthese are too big fillers 🙂
05:30:05shashlicki'm not very experienced with cmake and other builders honestly
05:30:51bung_it looks like these js engine doesn't offer a api evaluate js file also handle requires ?
05:31:30leorizerequires and friends are node-only stuff I think
05:32:55bung_ah, it would be nice to have such stuff call directly from nim
05:34:30shashlicknghttp2 wrapper - https://gist.github.com/genotrance/65bcb6957b27e710f97379386c5ef5c3
05:35:00shashlickwhat was next - quickjs - yes
05:39:49*audiophile quit (Quit: Default Quit Message)
05:40:26FromGitter<Knaque> Has anyone made Nim syntax highlighting for any of the HTML `<code>` highlighters out there?
05:42:36FromGitter<ynfle> https://prismjs.com/#supported-languages has nim
05:42:37*marnix quit (Ping timeout: 244 seconds)
05:44:08FromGitter<Knaque> Perfect, thank you.
05:45:39FromGitter<ynfle> 👍
05:46:45*maier joined #nim
05:46:50*maier is now known as kenran
05:48:37FromDiscord<flywind> Btw Nim stdlib also has `highlight` modules, you can do it by self. https://nim-lang.org/docs/highlite.html
05:51:42FromGitter<ynfle> PrismJs is very simple
05:52:05FromGitter<ynfle> Just define the langauge in attr initialize in JS and you're good to go
05:52:54*solitudesf joined #nim
05:54:35FromDiscord<flywind> I know it. Someone has made a Nim static blog generator using `prismjs`.
05:54:38FromDiscord<flywind> https://github.com/muxueqz/kun/tree/master/public/static
05:55:25*pietroppeter quit (Quit: Connection closed for inactivity)
05:56:41shashlick@bung_: quickjs wrapper - https://gist.github.com/genotrance/4869d1feb53c7ec7be806a2f225d07ab
06:03:22bung_ah I'll give a try
06:03:38bung_it described "Almost complete ES2020 support including modules,"
06:07:38*oculux quit (Ping timeout: 260 seconds)
06:09:10FromDiscord<Synth> Hello, I'm trying to `stdout.write()` colored text. Does anyone know how I could achieve this? If so, please ping me. Thank you!
06:11:05shashlickSee the terminal module
06:11:09shashlickI think
06:11:16FromDiscord<Elegant Beef> Yea
06:13:25FromDiscord<Synth> I've taken a look at the module
06:17:47*FromDiscord quit (Remote host closed the connection)
06:18:04*FromDiscord joined #nim
06:19:32*go|dfish quit (Ping timeout: 256 seconds)
06:19:39*marnix__ is now known as marnix
06:25:46shashlickhttps://github.com/genotrance/snip/blob/master/src/snip/ui.nim is how i did it in snip
06:31:43*rokups joined #nim
06:33:03*go|dfish joined #nim
06:34:31*B4s1l3 quit (Quit: Konversation terminated!)
06:38:37FromDiscord<Yardanico> @Synth well you set current color with terminal, write text with that color, reset attributes
06:38:44FromDiscord<Yardanico> There's also styledWrite
06:39:15FromDiscord<Yardanico> https://nim-lang.org/docs/terminal.html#styledWrite.m%2CFile%2Cvarargs%5Btyped%5D
06:42:52*PMunch joined #nim
06:43:46shashlick@ynfile - last one for the night - tensorflow wrapper - https://gist.github.com/genotrance/9214b1c1762c1fc85e62bac1de67725f
06:52:31bung_shashlick header: "/home/gt/.cache/nim/nimterop/nimquickjs/quickjs.h" the path should point to where?
06:53:02PMunchHmm, I think I might want to write stacklang 2.0
06:53:18PMunchkrux02 planted some interesting ideas in my head yesterday
06:58:38FromDiscord<Synth> Hmm okay, thank you
06:58:39shashlick@bung_? it should point to the location of the quickjs header
06:59:05shashlickyou'd rather generate it for your setup using the nimterop wrapper rather than the raw output
07:02:23bung_how to do that ?
07:05:08bung_ah , I install fails that's why I have no toast binary
07:09:57shashlickwhat's the error
07:11:40bung_it first build fails then ask me install nimterop#head
07:11:42bung_... /Users/bung/.choosenim/toolchains/nim-#devel/lib/system/fatal.nim(49, 5) Error: unhandled exception: shell.nim(84, 16) `false` Command failed: 128 ... cmd: cd /Users/bung/.cache/nim/nimterop/nimterop/treesitter_cpp && git log --decorate --no-color -n 1 --format=oneline ... result: ... fatal: your current branch 'master' does not have any commits yet [AssertionDefect]
07:14:01bung_I even didnot git init under project root
07:15:14shashlickplease delete ~/.cache/nim/nimterop altogether and try again
07:21:13bung_doing it
07:21:43*pietroppeter joined #nim
07:31:13bung_it will take over ten minutes?
07:31:35bung_it still "Building nimterop/nimterop/toast using c backend"
07:31:54FromDiscord<demotomohiro> This PR is not merged to nimgl repository.↵https://github.com/nimgl/imgui/pull/2
07:31:55disbotFix compile error from nim cpp tests/test.nim
07:39:32shashlick@bung_ takes 20 seconds on my small linux box
07:39:55shashlickmaybe a minutes max for first time
07:40:13shashlickhow long does nim take to bootstrap typically
07:40:46Oddmongerhello, i've looked the link given yesterday ( https://github.com/nim-lang/Nim/wiki/Curated-Packages ) : there is an entry for curses, but no link. Is this an error or there's really nothing for ncurses ? Otherwise, i've found this: https://github.com/rnowley/nim-ncurses but don't know if it's ok
07:40:48bung_maybe cause am using nim 1.3.3 ?
07:41:20shashlickthat's what i'm using as well
07:41:31shashlickdid you compile it in debug mode or something
07:41:37shashlickpresume you used koch
07:41:54shashlickwhat version of gcc do you have
07:42:21solitudesfOddmonger, this one is maintained https://github.com/walkre-niboshi/nim-ncurses
07:42:52bung_Apple clang version 11.0.0 (clang-1100.0.33.17)
07:44:31Oddmongerthank you solitudesf , this one seems nice too (but only inspired by ncurses): https://github.com/johnnovak/illwill
07:45:22*Jjp137 quit (Quit: Leaving)
07:45:24shashlicki don't see why it should take so long - is it still not done?
07:45:42shashlickinstead, can you git clone and run `nim c nimterop/toast` and see what happens
07:46:29FromGitter<bung87> I cancel it after about 15 mins, I check it when am back, buy some drinking
07:48:13*Jjp137 joined #nim
08:15:36*dddddd joined #nim
08:16:20bung_shashlick same in clone, or should i remove whole ~/.cache/nim/ ?
08:17:58*letto quit (Quit: Konversation terminated!)
08:19:53bung_there's https://github.com/ImVexed/quickjs4nim looks like generated through nimgen
08:23:47*vicfred quit (Quit: Leaving)
08:38:01PMunchI keep forgetting, what is the fast version of koch?
08:39:00FromDiscord<gokr> @dom96 I am wondering, if I add an installDir - it evidently seems to look for it under src (if I have srcDir set to "src" which I think is proper style). Is that a rule?
08:52:28Oddmongernimble | grep "up[dgr]\+a[dt]e" # no match
08:52:42Oddmongeris it possible to update all packages at once ?
08:52:44*nikita_ is now known as nikita
08:53:14*nikita is now known as Guest25669
08:58:46slackytude[m]what would I need to do to have my nim executable run on mac?
08:59:45Oddmongeryou need Xcode (i've seen that in the doc, i don't use mac)
08:59:53*fanta1 joined #nim
09:00:11Oddmongerif i have well read, you can't cross-compile with nim for mac
09:03:36slackytude[m]thats kinda sucky
09:04:37PMunchWell, that doesn't really seem to be the case: https://forum.nim-lang.org/t/2652
09:05:02slackytude[m]oh noice
09:05:06slackytude[m]let me check that
09:05:11slackytude[m]thx
09:05:13PMunchThat is compiling from Linux to MacOS, but I guess it would be similar for Windows
09:05:14PMunchNo problem
09:05:44PMunchdisruptek, could disbot be made to show the title for forum links as well? Similar to how it shows the title of repo issues?
09:07:51*oddp joined #nim
09:10:00PMunchMan, the documentation generation is a real mess..
09:10:11PMunchI think I've now found three ways of passing the output format around
09:10:31slackytude[m]I forgot how ugly cross compiles are
09:10:39slackytude[m]maybe there is a nice docker for that
09:14:42*JustASlacker joined #nim
09:23:34*krux02 joined #nim
09:26:52FromDiscord<impbox> i did manage to cross compile from linux to mac but it was a real pain
09:27:06FromDiscord<impbox> https://github.com/tpoechtrager/osxcross
10:02:04Oddmonger what is the difference between const and let ?
10:02:29Oddmongerconst is only for preprocessor, and not usable in the source ?
10:02:35FromDiscord<mratsim> const are done at compiletime
10:03:09FromDiscord<mratsim> Nim doesn't have a preprocessor, but you can run lots of computation at compile-time
10:03:38Oddmongerso it's only for compilation
10:04:35FromDiscord<mratsim> If you know the value or can derive the value at compile time for example↵↵const x = align("foo", 10)
10:05:03FromDiscord<mratsim> you will have " foo" inline everywhere and the actual computation will not appear in the code, only the result
10:05:16FromDiscord<mratsim> (this is left pad)
10:05:35FromDiscord<mratsim> if you use "let" there will be an actual function call in the code
10:05:52FromDiscord<mratsim> Also "const" can be use for dependent types
10:06:35FromDiscord<mratsim> for example: https://github.com/numforge/laser/blob/master/laser/dynamic_stack_arrays.nim#L6-L18
10:06:39FromDiscord<jseb> oh, it can compute things at compile time
10:07:10Oddmongerok, thank you for the sample mratsim
10:07:28FromDiscord<mratsim> My array size is parametrized by a const integer, this is not possible with a let
10:08:15Oddmongercan't you do something like «let length = length(array) » ?
10:08:27FromDiscord<mratsim> @jseb you would be surprised by the number of things you can do at compile-time
10:08:48FromDiscord<mratsim> I've implemented BigInt and a proof-of-concept of a machine learning compiler at compile-time
10:08:52FromDiscord<mratsim> and a state machine generator
10:09:25leorizethe only caveat is that nimvm is slow :p
10:09:32FromDiscord<mratsim> @Oddmonger, yes you can do this, but you cannot use the new "length" value everywhere that required a const
10:09:36*Tongir quit (Ping timeout: 256 seconds)
10:09:47FromDiscord<mratsim> nah, it's as slow as Python which is plenty fast
10:10:00Oddmongeri think i understand
10:10:03FromDiscord<mratsim> much faster than C++ template metaprogramming
10:10:04Oddmongerthank you
10:11:27Oddmongeranother one: i've tried nimx , for having portable GUI. It's quite slow to compile at first, and then when the obj are cached, the compilation is faster then. But it stills does a lot of things (2.5 seconds for relinking without modifications, on a good machine). So i wonder if the solution could be to generate a library with the functions i want from nimx, for avoiding the linking state everytime ?
10:14:02FromDiscord<mratsim> In my experience, the slowest thing in a project is if there are C or C++ files/header and it's not pure Nim because the C filesare recompiled.↵The second slowest is when you have a lot of compile-time computation but that's not the case for Nimx
10:14:25*fredrikhr joined #nim
10:14:35FromDiscord<mratsim> yes you can do a library, though I'm not an expert on Nim DLLs
10:17:20Oddmongerok that's not very important for now anyway, i was just curious. Thank you
10:20:01FromDiscord<mratsim> When I found the compilation too slow with C/C++ lib I just build them as DLL as you said: https://github.com/numforge/agent-smith/blob/master/third_party/ale_build.nim
10:20:09FromDiscord<mratsim> (and replacing CMake in the process 😉
10:27:21*xet7 quit (Quit: Leaving)
11:17:07*PMunch_ joined #nim
11:17:27*PMunch quit (Read error: Connection reset by peer)
11:30:41*xet7 joined #nim
11:31:00Oddmongergood to know, thanks
11:33:30Oddmongeri don't like cmake very much… in fact, for something supposed to be easier than make, i see it as a lie
11:46:25Oddmongermratsim, can you tell me how to build «agent smith» ? I've cloned your repo, and have done «nimble build» at root , but it answers there is nothing to build
11:54:36*rockcavera joined #nim
11:56:44*Vladar joined #nim
11:57:25*Guest25669 is now known as nikita
11:57:43*nikita quit (Quit: Reconnecting)
11:58:00*Guest6133 joined #nim
12:00:38*PMunch_ is now known as PMunch
12:00:47*Guest6133 is now known as nikita`
12:06:01*supakeen quit (Quit: WeeChat 2.8)
12:06:42*supakeen joined #nim
12:10:02FromDiscord<exelotl> Oddmonger: ow yeah I agree, cmake is pretty painful :(
12:12:54*Trustable joined #nim
12:15:11krux02regarding cmake, I think that there is a reason that my 9 commits project here got pretty popular: https://github.com/krux02/minimal_cmake_example
12:18:28Oddmongerthank for the sample, i tried the official «documentation» and sink in despair
12:18:40Oddmongersink… sank … sunk i mean
12:19:11*abm joined #nim
12:22:25*JustASlacker quit (Ping timeout: 264 seconds)
12:29:29PMunchQuick guess, there is no sane way of getting the name of a constant given a value?
12:30:05FromDiscord<Rika> i dont see how
12:30:17PMunchkrux02, I started thinking about your negative stack thing. Really interesting, but I think it would be a PITA to implement
12:30:45PMunchBasically the stack operations would need to be some kind of async operation
12:30:58PMunchSo that they can suspend the execution until you get a value
12:31:18krux02you can see it that way.
12:31:52PMunchI also have an "insert" operation in stacklang, that would be interesting to implement :P
12:32:11krux02My thoughts were also more for a programming language not an interactive stack.
12:32:13PMunchInserting values into some negative positions on the stack so they suddenly become available
12:32:39krux02So that at the end there is static checking that the stack has a size of zero
12:33:19PMunchOh
12:33:20krux02and everything gets compiled to something that isn't really a stack. It is just a concept that is used to resolve the semantics.
12:33:31PMunchIn stacklang it just outputs whatever was left on the stack
12:33:32krux02it surely can be implemented as a real stack though.
12:33:39PMunchWhich is how the program can return stuff
12:33:48PMunchWell, I also have a echo thing
12:34:29krux02btw you are developing on linux as well, don't you?
12:34:34PMunchYup
12:35:13krux02I would like to have someone to test my opengl-sandbox again, in term of. Does it even run on other peoples computers.
12:35:49krux02after nimble has failed me many times, I eventually migrated to git submodules now.
12:36:20krux02You would do me a great favor if you agree to try it.
12:37:19krux02like a real user test as good software should always do.
12:38:51PMunchSure, just tell me how to try it
12:41:44disruptekPMunch: forum titles, sure.
12:41:54PMunchdisruptek, sweet
12:42:29disrupteki'll make a ticket. might be a little bit.
12:43:10PMunchNo problem, just thought of it when I had to link someone a post
12:44:08disruptekdon't tell him how to try it; that defeats the purpose.
12:44:42disruptekuser testing involves the user having a goal and using your product to attempt to achieve it.
12:45:03PMunchOkay, tell me what I should try to achieve then
12:45:23disruptekwell, i do need a renderer for graphs. 😁
12:46:09disruptekor just something like "make text appear on the screen with a given background color"
12:46:21FromDiscord<Zachary Carter> Wrapping C++ is confusing af... I'm trying to wrap - https://github.com/guillaumeblanc/ozz-animation/blob/master/include/ozz/base/io/stream.h
12:47:04FromDiscord<Zachary Carter> and I always run into errors like these - https://gist.github.com/zacharycarter/e2937f718c21bc62e13306884c46a372
12:47:32FromDiscord<Zachary Carter> I don't understand whyyyyyy
12:50:13FromDiscord<Zachary Carter> I understand why the generated C++ code compiles - but what I don't understand is how to fix it to get it to compile.
12:53:15disruptekdunno, but i'd look for some other cpp wrappers for ideas.
12:53:42disruptekshashlick is mr. wrapper, as you know... 😉
12:54:03FromDiscord<Zachary Carter> oh yeah - he's fixed like four or five nimterop bugs in the past couple days for me
12:54:41disrupteki think if you say shashlick shashlick shashlick va-va-voom he'll just appear in the chat.
12:54:51disruptekfix your bugs.
12:54:56FromDiscord<Zachary Carter> I've looked at other C++ wrappers but no ah ha moments yet
12:54:58FromDiscord<Zachary Carter> hahaha
12:54:58disruptekupload a new wrapper to a gist.
12:55:47disruptekif that doesn't work, you might have to go to his house and camp out on his lawn.
12:55:53FromDiscord<Rika> PMunch: about negative stacks, why not have operations be put into a 2nd stack when theyre lacking operands, and pop them once theyre fulfilled
12:55:55FromDiscord<Rika> or something
13:08:25FromDiscord<jseb> is it true that you can now replace `nake` with `nimble`, for building ?
13:10:52*krux02 quit (Remote host closed the connection)
13:11:34*krux02 joined #nim
13:26:39FromDiscord<exelotl> @jseb yes, or even just `nim mytask`
13:27:02FromDiscord<exelotl> where `mytask` is defined in your project's "config.nims" file
13:32:01FromDiscord<Zachary Carter> you don't even need nimble
13:32:07FromDiscord<Zachary Carter> you can just use a nimscript file - which is what I do
13:32:35PMunch@Rika, yes that's the plan, but that is in principle the same as what an async system does
13:32:52FromDiscord<Rika> i see
13:32:55FromDiscord<exelotl> here are the docs: https://nim-lang.org/docs/nims.html
13:39:29*audiophile joined #nim
13:40:08disruptek~nimscript is mostly nim. it's analogous to clojurescript in that it's the same language, running on a different backend. in the case of nim, it's running on the nim vm.
13:40:08disbotnimscript: 11NimScript is the subset of Nim that can be evaluated by Nim's builtin virtual machine - https://nim-lang.org/docs/nims.html
13:40:08disbotnimscript: 11mostly nim. it's analogous to clojurescript in that it's the same language, running on a different backend. in the case of nim, it's running on the nim vm.
13:40:56disruptek~nimscript is mostly nim. it's analogous to clojurescript in that it's the same language, running on a different backend. in the case of nimscript, it's running on the nim vm.
13:40:57disbotnimscript: 11NimScript is the subset of Nim that can be evaluated by Nim's builtin virtual machine - https://nim-lang.org/docs/nims.html
13:40:57disbotnimscript: 11mostly nim. it's analogous to clojurescript in that it's the same language, running on a different backend. in the case of nimscript, it's running on the nim vm.
13:41:17disruptekspammy, i know.
13:41:28disrupteki just don't care about you all.
13:41:40FromDiscord<Zachary Carter> that's obvious
13:42:23FromDiscord<Zachary Carter> otherwise we'd have IC or a compilation server by now
13:42:39disruptekactually, i'm working on a couple cool things for nim right now.
13:43:03disruptekone is secret, the other is top secret.
13:43:12FromDiscord<Zachary Carter> oooo
13:43:17FromDiscord<Zachary Carter> can you make my importcpp code work?
13:43:21disrupteknope.
13:43:22FromDiscord<Zachary Carter> is that the top secret one?
13:43:25FromDiscord<Zachary Carter> fuckkkkkk
13:43:29disruptekthat's arcane majik.
13:43:37FromDiscord<Zachary Carter> SOMEONE has to know how this shit works
13:43:39FromDiscord<Zachary Carter> looking at Araq
13:43:52FromDiscord<Zachary Carter> actually it seems like there are quite a few community members who have wrapped cpp libs
13:44:09FromDiscord<Zachary Carter> none of them ever chime up when I ask questions about this stuff though - besides leorize and he just tells me took at the generated code
13:44:40FromDiscord<Zachary Carter> well they just tell me - need to start being better about this before another incident happens
13:45:31disruptekbut how is this something that doesn't appear in other libs?
13:45:54FromDiscord<Zachary Carter> it definitely does - but I'm not doing anything differently from what I can tell
13:46:24disrupteklet me look at this and just throw swags at you.
13:46:26FromDiscord<Zachary Carter> the only thing that might be different is there's no default constructor defined for this type in the C++ code
13:46:52FromDiscord<Zachary Carter> and the generated C++ code does something like - `N_LIB_PRIVATE ozz::io::File f__bB9c2jWHU9cutANbte9by7cXw;`
13:46:55disruptektake the constructor out, then.
13:47:06disruptektake the .constructor out, then.
13:47:07FromDiscord<Zachary Carter> I need the constructor though - the one that's defined in C++
13:47:21disruptektake it out.
13:47:37FromDiscord<Zachary Carter> this one - `https://github.com/guillaumeblanc/ozz-animation/blob/master/include/ozz/base/io/stream.h#L99`
13:47:47FromDiscord<Zachary Carter> how else am I going to invoke that then?
13:47:50krux02Zachary Carter: what is your question.
13:47:55krux02I've worked with c++ in the past.
13:48:02disrupteki have no idea. i just want to see how the behavior changes.
13:48:22FromDiscord<Zachary Carter> I'm trying to wrap this header - https://github.com/guillaumeblanc/ozz-animation/blob/master/include/ozz/base/io/stream.h
13:48:26FromDiscord<Zachary Carter> specifically the `File` class
13:48:52FromDiscord<Zachary Carter> here's what I've tried - along with the error that is produced: https://gist.github.com/zacharycarter/e2937f718c21bc62e13306884c46a372
13:49:06FromDiscord<Zachary Carter> and I can gist the generated C code too - one moment
13:50:07FromDiscord<Zachary Carter> Okay the gist is updated with the generated cpp code
13:50:11FromDiscord<Zachary Carter> sorry not c
13:50:27disruptekhe's not a nazi just because he wants updates.
13:50:38disruptekfascism is a much deeper ideology.
13:51:29FromDiscord<Zachary Carter> lol
13:53:09FromDiscord<Zachary Carter> I'm guessing it's because File doesn't have any constructor that takes zero params defined in it
13:53:36disruptekokay, lemme look at this new one.
13:53:59FromDiscord<Zachary Carter> in the cpp code I mean - but why Nim generates what it does - where it creates an uninitialized File object, I'm not sure how to avoid
13:54:15FromDiscord<Zachary Carter> Here's the impl for that header btw - https://github.com/guillaumeblanc/ozz-animation/blob/master/src/base/io/stream.cc
13:54:16disruptekwhen you import the constructor, change the pattern.
13:54:33FromDiscord<Zachary Carter> to what?
13:54:42disrupteki dunno, the docs tell you how to construct it.
13:54:52disruptekat least, i think it's in the docs.
13:55:00disrupteki might have read the compiler.
13:55:08*lritter joined #nim
13:55:33disruptekhttps://nim-lang.org/docs/manual.html#importcpp-pragma-namespaces
13:55:52FromGitter<jarv_gitlab> Hello I am brand new to nim and have what I hope is a simple question. In a program I want to create a table where the keys are strings and the values are procs. The functions have side-effects and after reading about how nim handles functions with side-effects I am expecting this to work but it doesn't. https://play.nim-lang.org/#ix=2qMi Is it valid to use a table like this? Why am I seeing an error only when
13:55:52FromGitter... line#4 is commented out?
13:56:20FromDiscord<Zachary Carter> https://nim-lang.org/docs/manual.html#importcpp-pragma-wrapping-constructors - is pretty much what I'm doing
13:56:22FromDiscord<Rika> welcome
13:56:33FromDiscord<Zachary Carter> Hi jarv_gitlab
13:56:37FromDiscord<Rika> one moment, ill look into the code
13:56:59FromDiscord<kodkuce> sent a code paste, see https://play.nim-lang.org/#ix=2qMj
13:57:38FromDiscord<Rika> kodkuce i dont see why not
13:57:56disruptekthat bot translation needs to be fixed.
13:58:02disruptekYardanico: ^
13:58:21FromDiscord<Rika> @jarv_gitlab: i dont think the link is correct? i dont see any table code
13:58:28FromDiscord<Rika> maybe you miscopied?
13:58:32disruptekput the question in a comment block, please and thank you.
13:58:54FromGitter<jarv_gitlab> @rika sorry I think it was a bad paste https://play.nim-lang.org/#ix=2qMf is the right link
13:58:56FromDiscord<kodkuce> i think too its legit but was like meybe i duno something so wanted to confirm
13:59:08disruptekyou have to await the sleepAsyncs.
13:59:36FromDiscord<kodkuce> yep sorry frogot to write that in question
13:59:46*waleee-cl joined #nim
13:59:52FromDiscord<Rika> @jarv_gitlab: it will work if you use debugEcho instead
14:00:07disruptekwell, i'm not sure i understand the question.
14:00:33disruptekthe stuff gets destroyed at the end of scope.
14:00:53FromDiscord<Rika> @kodkuce i think it should work just fine
14:01:14FromDiscord<Zachary Carter> ohhh I think I maybe understand what I'm doing incorrectly
14:01:18*haxscramper joined #nim
14:01:21FromGitter<jarv_gitlab> @rika do know why if I comment out line number #4 in https://play.nim-lang.org/#ix=2qMf the compile error goes away?
14:02:02FromDiscord<Rika> @jarv_gitlab since the echo makes the first proc not have the "nosideeffects" pragma, and the type is inferred from the first entry in the table
14:02:33FromDiscord<Rika> removing echo makes it have the nosideeffects pragma and thats inferred into the table's type
14:02:55disrupteki'm thinking of arc here. and i should point out that there's no guarantee that stuff gets destroyed at end-of-scope. it may be reaped as soon as then, let us say.
14:03:04FromDiscord<Zachary Carter> nope I'm still lost 😛
14:03:15disrupteki think it's the pattern.
14:03:29FromDiscord<Zachary Carter> probably
14:04:05shashlickSorry had a late night plus don't know much about c++ wrapping yet
14:04:09FromGitter<jarv_gitlab> @rika Thanks that makes more sense to me now, is there another option to explicitly set the pragma to allow side-effects for all entries in the table?
14:04:34disruptekdamn, i swear it's free if you va-va-voom and he doesn't show up with a wrapper inside 30mins.
14:05:06disruptekkodkuce, what am i doing, here?
14:06:16FromDiscord<Rika> @jarv_gitlab: set the type explicitly; `let funcs: Table[string, proc()] = {` i think
14:07:14*PMunch quit (Quit: Leaving)
14:09:14krux02Zachary Carter: I think the problem is that you create a global variable.
14:10:21krux02put the `let f = ` into a proc main() =, and then it should work.
14:10:32FromGitter<jarv_gitlab> @rika hm, that doesn't seem to work
14:11:44krux02@Zachary_Carter: initializing global variables at construction is simply speaking not generally possible, so it is not supported by the compiler.
14:12:00krux02There should be an error or at least warning from the compiler though.
14:13:00FromDiscord<Rika> @jarv_gitlab: i think i know why, since the {} syntax is just syntax sugar for making an array of tuples, you'll have to make an intermediary variable i think
14:13:56FromDiscord<Zachary Carter> krux02: is there any other way I can do this?
14:15:41FromDiscord<Zachary Carter> oh I see - it's just because it's a global, let me try inside of a proc
14:16:06disruptekpeople here say "you's", pron. "use" or "ewes". the meaning is, "you all", as to address a group.
14:16:24disruptekis this something to preserve as historical identity of the region? culture?
14:16:55FromDiscord<Zachary Carter> that worked - thanks krux02!
14:17:08PrestigeWho says "you's" ?
14:17:27disruptekpeople 'round philadelphia.
14:17:54PrestigeWeird cultural slang
14:18:19disrupteki'm moving north next week. just been thinking about this area lately.
14:18:28FromGitter<jarv_gitlab> thanks @rika I will try experimenting a bit more to see if I can make it work, or just organize my code so the first entry has side-effects I guess
14:18:29PrestigeJust like people saying yall
14:18:38PrestigeWhere to disruptek?
14:19:04disruptekmy family has some land in vermont that i can camp on.
14:19:48FromDiscord<Zachary Carter> sounds pretty dope - as long as you have internet
14:20:02disruptekthat is, as they say, the rub.
14:20:05FromDiscord<Rika> i use y'all
14:20:11PrestigeVermont sounds nice. I'm in MD but moving next summer, maybe to Oregon
14:20:47disrupteki'm sorry, but maryland is kinda the meh of the east.
14:21:01PrestigeYeah. Not a fan
14:21:15FromDiscord<Zachary Carter> if MD is the meh of the east, what is Florida?
14:21:20disruptekit's like, good think the capitol is there because otherwise... no one would fucking go.
14:21:26shashlickThought you were going west what happened
14:21:31FromDiscord<Zachary Carter> Baltimore is cool
14:21:40FromDiscord<Zachary Carter> like a very small portion of Baltimore
14:21:46disruptekif i ever get a job, i'll go west.
14:21:54FromDiscord<Zachary Carter> I want to go to AZ - it's just soooooo expensive
14:22:01disrupteki'm too broke to move.
14:22:02FromDiscord<Zachary Carter> and my fiance wants to stay in Austin
14:22:09PrestigeWhat job are you looking for?
14:22:19disruptekthe one that lets me buy gas.
14:22:45disrupteki spent a winter in yuma.
14:22:48shashlickAZ is expensive or Austin
14:22:58disruptekit was pretty interesting. bought a lot of drugs in mexico.
14:23:14disrupteki mean, almost none.
14:23:15disrupteknone.
14:23:18FromDiscord<Zachary Carter> both are expensive - but I think AZ is more expensive than Austin
14:23:26disruptekdidn't buy any drugs in mexico, nope.
14:23:31FromDiscord<Zachary Carter> but I don't think either of them are as expensive as where I'm from (Northern VA)
14:23:41shashlickWhat's in AZ
14:23:50PrestigeDirt
14:23:50disruptekseriously.
14:23:52FromDiscord<Zachary Carter> not a lot of tech jobs that's for sure
14:24:00FromDiscord<Zachary Carter> but it's gorgeous
14:24:08disrupteknorth is nice, okay.
14:24:11disruptekbut it's not amazing.
14:24:14shashlick@disruptek with this covid stuff you can work anywhere, just need to give an interview
14:24:25FromDiscord<Zachary Carter> you can come write mediocre Python with me
14:24:35disrupteki had to be led away in handcuffs from my last interview.
14:24:40FromDiscord<Zachary Carter> lol
14:24:43disruptekngl, i'm not really looking forward to the next.
14:24:51shashlickOk sober interview
14:25:01FromDiscord<Zachary Carter> do the drugs after the interview
14:25:08PrestigeI'm leaving my current job soon, interviewing at a few places for a remote position
14:25:11disrupteki think i should focus on flame-retardant.
14:25:14FromDiscord<Shucks> sent a code paste, see https://play.nim-lang.org/#ix=2qMu
14:25:28disruptekcotton head to two, long sleeves, leather shoes.
14:25:31disruptektoe, two.
14:25:34disruptektoo, too.
14:26:09disruptekPrestige: i wanted to ask you where and then i knew.
14:26:09PrestigeWhat in the world happened at your last interview?
14:26:13disrupteki will fucking bury you.
14:26:26FromDiscord<Zachary Carter> lol
14:26:32PrestigeWhat lol
14:26:33disruptekthe court order says i'm not allowed to talk about it.
14:26:42disruptekespecially the senator's involvement.
14:27:09disrupteki'm specifically not to mention the ants.
14:27:58disruptekbut seriously, did i mention that status turned me down for an interview?
14:28:20FromDiscord<Rika> ~~expected~~
14:28:34disruptekyeah, i'm unteachable.
14:29:47shashlickMaybe do some gigs then, you're your own boss, still have a customer to keep happy though
14:30:19disruptekwhere do you even go to do that?
14:30:36disrupteki've looked at some gig sites and the pay is staggeringly low due to world-wide competition.
14:31:10shashlickI'd imagine, might even be worse now
14:31:30FromDiscord<Zachary Carter> just make an app
14:31:44disruptekwell, yeah; there are still like, what, 25 million unemployed? i really thought it was more. it's about 50%.
14:33:04PrestigeWhat world you do for a job if you had your choice?
14:33:32PrestigeWould*
14:33:39disruptekgigolo.
14:33:47PrestigePhone is hard to use
14:33:59disruptekis it?
14:34:31PrestigeFor me, yes. I miss phones with physical buttons
14:34:31disrupteki guess i'd be moving from strength to strength.
14:36:34disrupteki'm really enjoying systems programming, but i think i like pleasing women more.
14:37:04*NimBot joined #nim
14:37:21FromDiscord<Zachary Carter> there are a ton of systems programming jobs out there - especially if you don't mind coding (and are good at coding) in C/C++
14:37:46Prestigedisruptek: enjoy it while you can
14:38:31disruptekjesus, that sounds ominous.
14:38:47disruptekdo you know something we don't?
14:39:30disruptekwe should really have a rule against menacing in here.
14:40:16FromDiscord<exelotl> so it has come to this
14:41:10PrestigeSex stops being a super enjoyable thing after a while. I'd rather write code, or go on a jog
14:41:37disruptekhow old are you?
14:43:06disruptekdon't go off and make a sandwich on me.
14:43:09Prestige26
14:43:17disruptekeither you know how old you are or you don't, right?
14:43:38disruptektwo fucking minutes go by while this guy ponders his age.
14:43:47disrupteknarrator: he was 26, or so he thought.
14:43:56disrupteki mean, what the actual fuck.
14:44:00PrestigeHaha I was talking in another channel
14:44:26disrupteki'm 44.
14:44:54disruptekbut you might say i fuck like a man half my age.
14:45:26PrestigeNot really a matter of age, it will happen eventually
14:45:44disrupteki'm thinking about streaming today.
14:45:52disruptekwould anyone watch?
14:45:57FromDiscord<Zachary Carter> I'm only interested if whats his name streams his chickens
14:46:07disruptekminsin56
14:46:11FromDiscord<Zachary Carter> yeah minsin!!!
14:46:11disruptekthey dude is crazy.
14:46:42disruptekdid you ever watch his programming stream?
14:46:46FromDiscord<Vindaar> wow and I thought you were pretty young disruptek
14:47:23disrupteksometimes my ego amazes even myself.
14:47:28FromDiscord<Zachary Carter> I never did
14:47:34FromDiscord<Zachary Carter> but now I need to
14:47:45disrupteknever?
14:48:01disruptekbut you saw the chickens, right?
14:48:43FromDiscord<Zachary Carter> yeah
14:48:46FromDiscord<Zachary Carter> chickens were awesome
14:49:05FromDiscord<Zachary Carter> I'm watching one of his streams now on programming but there's no sound
14:49:07FromDiscord<Zachary Carter> dafuq
14:49:11disruptekthat guy has written at least one minecraft clone with voxels.
14:49:31disrupteki don't think i've ever heard sound on his stream.
14:49:41FromDiscord<Zachary Carter> a minecraft clone with voxels?
14:49:45FromDiscord<Zachary Carter> pretty gd novel
14:49:57disruptekthe point is that he's 15.
14:50:20FromDiscord<Zachary Carter> well that's pretty impressive for a 15 yo
14:50:33FromDiscord<Zachary Carter> I wasn't writing minecraft clones when I was 15
14:50:48disruptekhe's not lqdev territory, but it's good. i wonder how common it is now.
14:51:22*letto joined #nim
14:51:42Oddmongeri thought writing a lib (.so) in nim was as simple as defining some functions in a source, and then compiling it with --app:lib , but i must have missed something
14:52:07Oddmongerwhen i try to see the symbols with objdump , i see nothing that i've defined
14:52:07FromDiscord<Zachary Carter> you need to add the `exportc` pragma and the `dynlib` pragma
14:52:17Oddmongerahhhh
14:52:32shashlickSee Exportc and dynlib pragma
14:53:34Oddmongerhum wait i still dont have the symbols
14:53:38Oddmongerlike this ? :
14:54:29Oddmongernim c --app:lib -d:release -d:exportc -d:dynlib hellobib.nim
14:54:53FromDiscord<Zachary Carter> errr no
14:55:10FromDiscord<Zachary Carter> `exportc` and `dynlib` are pragmas you need to attach to the procs you want to export in the shared library
14:55:32FromDiscord<Zachary Carter> so `proc foo*() {.exportc, dynlib.} = echo "foo"`
14:56:10Oddmongerah like for using C, but inversed (i have found only for C lib importing , in the doc)
14:56:28Oddmongerthank you
14:57:25FromDiscord<Zachary Carter> np!
15:04:03Oddmongerah yes, it needs dynlib indeed it's not implicit
15:07:41FromDiscord<Zachary Carter> /.hjgb
15:07:41FromDiscord<Zachary Carter> ]'\
15:08:02disruptekthat bad, huh?
15:13:41*muffindrake quit (Quit: muffindrake)
15:17:28*kenran quit (Ping timeout: 258 seconds)
15:17:30FromDiscord<Rika> zachary has been taken over by their cat
15:22:43*audiophile_ joined #nim
15:23:30*mwbrown_ joined #nim
15:23:38FromDiscord<Zachary Carter> meow
15:23:49FromDiscord<Zachary Carter> haha I don't have any cats! just three dogs! but yeah - guaranteed it was one of them
15:25:40*mwbrown quit (Ping timeout: 240 seconds)
15:25:40*Amun_Ra quit (Ping timeout: 240 seconds)
15:25:41*audiophile quit (Ping timeout: 240 seconds)
15:25:41*mwbrown_ is now known as mwbrown
15:25:50*audiophile_ is now known as audiophile
15:26:47*Amun_Ra joined #nim
15:33:51*muffindrake joined #nim
15:39:28FromDiscord<lqdev> XD
15:40:58Prestigehm I really wish nimlsp worked better. Have to restart my lsp client every time I make changes in another file
15:41:39FromGitter<ynfle> Which editor are you using?
15:41:48Prestigeneovim
15:41:57FromDiscord<lqdev> nim.nvim
15:42:05FromDiscord<lqdev> works much better
15:43:00FromGitter<ynfle> In vscode you have to manually save the file you want to have the changes updated with
15:43:15PrestigeI'm using that for syntax highlighting - I use Coc for all programming so I'd like to keep the same workflow
15:43:39disruptekwait, you read in vscode but write in coc?
15:44:05Prestigenah I only use neovim w/coc
15:44:49PrestigeI was replying to lqdev
15:49:42*marnix_ joined #nim
15:50:20Prestigenimlsp looks messy but the protocol seems simple enough.. just didn't want to take time away from other projects to work on it. Maybe I will
15:50:50FromDiscord<KrispPurg> anyone know the cause of this error?↵https://play.nim-lang.org/#ix=2qMS↵↵I appear to be getting it commonly when I make a http request that responds with a large json data
15:51:08FromDiscord<KrispPurg> Nim version is 1.2.2
15:51:47FromDiscord<Rika> its a bug with using openssl it looks like
15:51:57FromDiscord<KrispPurg> huh
15:52:59*Trustable quit (Remote host closed the connection)
15:53:05FromDiscord<Rika> whats your openssl version
15:53:49FromDiscord<KrispPurg> how do I check?
15:53:57FromDiscord<Rika> uh 🙂 i dont know
15:54:00FromDiscord<Rika> haha
15:55:15*muffindrake quit (Quit: muffindrake)
15:55:36*audiophile quit (Ping timeout: 256 seconds)
15:56:54FromDiscord<KrispPurg> Found it 1.0.2.1
15:57:40FromDiscord<Rika> i think this might be related https://github.com/openssl/openssl/issues/322
15:57:41disbotSSL_do_handshake does not flush the write bio
15:57:48FromDiscord<Rika> only fixed in 1.1.0
15:58:17FromDiscord<KrispPurg> I see,
15:58:22FromDiscord<KrispPurg> (edit) 'see,' => 'see.'
15:59:04FromDiscord<KrispPurg> Would Nim have to even update ssl?
15:59:28FromDiscord<Rika> what do you mean
15:59:31*Trustable joined #nim
15:59:33FromDiscord<Rika> nim doesnt bundle ssl i dont think
16:00:13FromDiscord<KrispPurg> I mean the ssl file
16:00:23FromDiscord<KrispPurg> sslleay.dll
16:00:51FromDiscord<Rika> i dont understand
16:01:16FromDiscord<KrispPurg> Never mind.
16:01:54dzamo[m]098poiPOI)*(
16:02:12FromDiscord<Rika> another one's cat has taken over
16:02:29Prestigelooks like a password
16:03:12Prestigepattern on qwerty
16:03:24FromDiscord<Rika> @dzamo did you accidentally type a password?
16:03:38FromDiscord<Rika> it might be a cat tho really
16:04:36FromDiscord<mratsim> Seems like the password of Kame Sennin
16:05:12FromDiscord<Rika> you remind me to learn shogi lol thanks i guess
16:07:29FromDiscord<mratsim> tell me if you find a good server, though i don't see where I would find the time to play :p
16:08:16FromDiscord<Synth> sent a code paste, see https://play.nim-lang.org/#ix=2qMV
16:09:44FromDiscord<mratsim> I think the docker images use Alpine :?
16:14:08PrestigeI have a weird thing I'm wondering if is possible... can a template/macro be created to mimic a property of an object? Where you could say foo.bar = 5, but bar is not actually a property?
16:14:24FromDiscord<mratsim> sure
16:14:43FromDiscord<mratsim> https://github.com/status-im/nim-cookbook/blob/master/dynamic_approximating_dynamic_types.nim
16:14:46FromDiscord<mratsim> here you go
16:15:07PrestigeThanks, I'll give it a read
16:15:23FromDiscord<Clyybber> I think what you want is a setter proc
16:15:26FromDiscord<Clyybber> or template
16:15:42disruptekagree.
16:15:48FromDiscord<Clyybber> https://nim-lang.github.io/Nim/manual#procedures-properties
16:16:12Prestigeoh perfect
16:16:16PrestigeTy ty
16:16:26FromDiscord<mratsim> yes this is preferable if it fits your needs
16:16:44FromDiscord<mratsim> my solution is if "bar" is also only known at runtime
16:18:00Prestigeis the inline pragma needed?
16:18:32FromDiscord<mratsim> it's never needed
16:19:02FromDiscord<mratsim> but here it avoids a function call and allows the compiler to do constant propagation if the value you set is known at compile-time
16:19:23FromDiscord<mratsim> + various other optimizations that are not possible if what you o is hidden behind a proc
16:19:30*audiophile joined #nim
16:21:06*muffindrake joined #nim
16:25:04*nkoza joined #nim
16:27:42*kitech1 quit (Quit: ZNC 1.7.5 - https://znc.in)
16:28:02*kitech1 joined #nim
16:30:52audiophileguise, is there any reason to create a wrapper when a c library exists and that can be interfaced with nim right?
16:32:08FromDiscord<Rika> thats what a wrapper is is it not?
16:32:18FromDiscord<Rika> you wrap c libraries for nim usage
16:33:39shashlickwrapping basically means to tell Nim what functionality the C library offers
16:33:46shashlicktypes, consts, procs
16:39:21*waleee-cl quit (Quit: Connection closed for inactivity)
16:39:26*audiophile_ joined #nim
16:39:50*fredrikhr quit (Ping timeout: 246 seconds)
16:42:49*audiophile quit (Ping timeout: 264 seconds)
16:42:53*audiophile_ is now known as audiophile
16:43:27*nsf joined #nim
16:44:20*dddddd quit (Ping timeout: 256 seconds)
16:45:28*audiophile is now known as Roomba
16:45:32*Roomba is now known as audiophile
16:46:20*Trustable quit (Remote host closed the connection)
16:46:58*nkoza quit (Remote host closed the connection)
16:56:56*Vladar quit (Quit: Leaving)
17:01:01FromDiscord<exelotl> it would be nice if we had some way to allow `+=` and stuff with getter/setter procs
17:01:16FromDiscord<Rika> wdym? is it not possible
17:01:41FromDiscord<Rika> ```proc `+=`(dest: var T, val: T) = discard```↵?
17:03:47FromDiscord<exelotl> no, like `foo.x += 1` when you have``` proc x(a:T): int ``` and ``` proc `=x`(a:T, v:int) ```
17:04:08FromDiscord<Rika> `proc x(a:var T): var T`?
17:04:15FromDiscord<exelotl> (edit) '`=x`(a:T,' => '`x=`(a:T,'
17:04:53FromDiscord<Rika> then you can do `a.x = 2` or w/e that takes in a var T
17:05:02FromDiscord<Rika> i mean var U for a's type btw
17:05:13FromDiscord<lqdev> that's not what he means
17:05:41FromDiscord<Rika> you only want +=?
17:05:44FromDiscord<lqdev> he means that if you have a setter and getter you cannot use the compound assignment operators += etc.
17:05:45FromDiscord<Rika> maybe not possible
17:05:58FromDiscord<Rika> eh? really? i was pretty sure you could
17:06:01FromDiscord<Recruit_main707> Cant you do proc 'x+='(...
17:06:05FromDiscord<Rika> no
17:06:48FromDiscord<exelotl> something like that might be nice... I'm pretty sure it doesn't exist currently
17:06:57FromDiscord<Rika> https://play.nim-lang.org/#ix=2qN4 ???
17:07:01FromDiscord<Rika> i just did it
17:07:22FromDiscord<Rika> += is just a 2 arg no ret proc with arg 0 being var T and arg 1 being T
17:07:32FromDiscord<Rika> a getter that returns a var T will work with +=
17:08:10FromDiscord<exelotl> I see, that's cool, but unfortunately my getter can't return var T
17:08:11FromDiscord<Rika> its also how mitems works i think
17:08:22FromDiscord<Rika> oh? then cant do anything about it i dont think
17:08:36FromDiscord<Rika> you can make two getters with arg 0 nonvar T and var T
17:08:48FromDiscord<Recruit_main707> Never understood getters and setters point unless you are interopig
17:08:56FromDiscord<Recruit_main707> interoping*
17:08:57FromDiscord<Rika> if not possible then RIP cant do anything about that
17:09:14FromDiscord<Rika> getters are nice if you want to limit access and stuff
17:09:29FromDiscord<Rika> w/o using "olden" names like getX and setX or so
17:09:58FromDiscord<Rika> though ara q still likes them for some reason, but /shrug he prolly has a very good reason to use them that i dont know
17:10:52FromDiscord<exelotl> here's an example of the thing I wish could have +=
17:10:54FromDiscord<exelotl> https://github.com/exelotl/natu/blob/master/natu/private/oam.nim#L242
17:11:16FromDiscord<lqdev> @Recruit_main707 well they make it possible to make fields immutable outside of the declaring module
17:11:39FromDiscord<lqdev> you simply make it private, create a getter and don't export it
17:11:41FromDiscord<Rika> wait, you're adding a bool? huh?
17:11:53FromDiscord<lqdev> s/don't//
17:11:57FromDiscord<Rika> ah thats converted to an int
17:12:06FromDiscord<exelotl> it's a bitwise and
17:12:14FromDiscord<Rika> sadly i dont think you can var'ify that
17:14:18FromDiscord<Clyybber> you can still do it
17:14:28FromDiscord<Clyybber> but you need to define a +=
17:14:42*theelous3 joined #nim
17:14:47FromDiscord<Rika> i dont see how...
17:15:05FromDiscord<exelotl> you'd have to make an untyped += macro that checks for the presence of getter/setter procs, right?
17:15:10FromDiscord<Clyybber> yeah
17:15:26FromDiscord<exelotl> sounds ugly but might be worth a try one day xD
17:15:31FromDiscord<Clyybber> it doesn't have to be untyped actually
17:15:46FromDiscord<Clyybber> you can make it typed but check the LHS
17:15:53FromDiscord<Clyybber> which will be the getter
17:15:53FromDiscord<exelotl> ah true
17:15:58FromDiscord<Clyybber> from that you could get the setter
17:16:37FromDiscord<Rika> sounds painful 😛
17:16:59FromDiscord<exelotl> another solution in my case, could be to redefine my datatype to use the {.bitsize.} pragma instead of getters/setters
17:17:05FromDiscord<exelotl> https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-bitsize-pragma
17:17:31FromDiscord<exelotl> that would mean breaking compatibility with the underlying C types from the library that I'm wrapping
17:17:47FromDiscord<exelotl> but it could work out OK I guess
17:20:08*nkoz joined #nim
17:21:57*theelous3_ joined #nim
17:31:24*rokups quit (Quit: Connection closed for inactivity)
17:42:08*endragor quit (Remote host closed the connection)
17:42:48*endragor joined #nim
17:42:56*endragor quit (Remote host closed the connection)
17:43:03*endragor joined #nim
17:45:57krux02I have the feeling more and more people migrate to discord
17:46:22disrupteki'm blocking it and gitter more often.
17:46:42krux02blocking?
17:46:54disruptekwell, filtering it out with /ignore.
17:47:17krux02ah that you mean.
17:47:21krux02No I don't do that.
17:47:54krux02I just realized there is a trend towards discord because everything within an houre was discord only
17:48:22disrupteksee, that's the stuff i want to ignore. 😉
17:48:58FromDiscord<Clyybber> :(
17:49:14FromDiscord<Clyybber> Araq: ping
17:50:36FromDiscord<Clyybber> Araq: Having an issue where the int `f` in `f += 1` is not an nkHiddenAddr when the call arrives in ccgcalls.nim; how can that be?
17:52:06FromDiscord<Clyybber> its nkSym directly
17:52:23FromDiscord<Clyybber> krux02: Do you know how that could possibly happen?
17:52:57krux02I don't know it.
17:52:59krux02maybe it is a bug.
17:53:31FromDiscord<Clyybber> would be a really big one :D
17:53:33*a_chou joined #nim
17:58:47*a_chou quit (Remote host closed the connection)
18:00:22*synshroud joined #nim
18:01:59*a_chou joined #nim
18:03:13*vr0n joined #nim
18:05:47*a_chou quit (Client Quit)
18:08:47*audiophile quit (Quit: Default Quit Message)
18:18:48FromDiscord<kodkuce> if i want to random betwin 500 and 750, i cant rand(500, 750) and there is no shorcut right, only soultuon is to 500+rand(250) ?
18:20:16Jjp137you can do rand(500..750)
18:20:19FromDiscord<Rika> rand 500..750 i think?
18:21:41FromDiscord<kodkuce> oh, would that be inefficient like isent that liek creating an inerator/array of 250ints ?
18:22:02FromDiscord<Rika> it is not
18:22:21FromDiscord<Rika> 500..750 creates a Slice object with 2 ints, 500 and 750
18:22:24FromDiscord<Rika> thats it
18:24:17FromDiscord<kodkuce> ok 🙂
18:27:24FromDiscord<Shucks> could I unpack a sequence? e.g.: `var a, b = @[1, 2].unpack`
18:28:19FromGitter<ynfle> !repo unpack
18:28:20disbothttps://github.com/technicallyagd/unpack -- 9unpack: 11sequence/object unpacking/destructuring for nim 15 29⭐ 0🍴 7& 2 more...
18:38:56FromGitter<ynfle> @Shucks, does that help?
18:41:02FromDiscord<Shucks> Yea was hoping for something built in
18:52:50*audiophile joined #nim
18:59:44*krux02 quit (Remote host closed the connection)
19:03:59*go|dfish quit (Ping timeout: 256 seconds)
19:16:27*nsf quit (Quit: WeeChat 2.8)
19:17:31*kenran joined #nim
19:17:35*go|dfish joined #nim
19:19:44*dddddd joined #nim
19:23:01*marnix quit (Ping timeout: 264 seconds)
19:31:01vr0nis there a way with nim-prompt to auto-clear the screen? prompt.clear() doesn't throw an error, but it also doesn't do anything
19:33:32*synshroud quit (Quit: ZNC 1.7.5 - https://znc.in)
19:37:25FromDiscord<Vindaar> vrOn: never used that library, but just had a short look at the code. did you redraw after `clear`?
19:39:56FromDiscord<Vindaar> ups, vr0n^
19:39:58vr0ni didn't, but i when i just tried the redrawPrompt() command, i got a unicode error.... that's odd
19:40:09vr0nthank you, though. that is a tleast a start. i think i might be missing a required library
19:40:20*audiophile_ joined #nim
19:40:47FromDiscord<Vindaar> hm, curious
19:41:29vr0nsays error is coming from: .nimble/pkgs/unicodedb-0.9.0
19:44:02*audiophile quit (Ping timeout: 264 seconds)
19:44:02*audiophile_ is now known as audiophile
19:45:04*marnix joined #nim
19:46:14*marnix_ quit (Ping timeout: 256 seconds)
19:48:13*fredrikhr joined #nim
19:50:22*audiophile quit (Quit: Default Quit Message)
19:50:41FromDiscord<Varriount> Is this a compiler error, or a runtime one?
19:51:05*marnix_ joined #nim
19:51:19FromDiscord<Vindaar> and do you have a snippet that reproduces the problem?
19:54:14*marnix quit (Ping timeout: 240 seconds)
19:54:32*marnix_ is now known as marnix
20:21:12*abm quit (Quit: Leaving)
20:24:11*marnix quit (Ping timeout: 246 seconds)
20:31:42*waleee-cl joined #nim
20:33:16*vicfred joined #nim
20:35:39vr0ncompiler
20:35:50vr0none sec, ill post a pastebin link
20:36:22*fanta1 quit (Quit: fanta1)
20:38:00*haxscramper quit (Remote host closed the connection)
20:46:17*sknebel quit (Quit: No Ping reply in 180 seconds.)
20:46:51*sknebel joined #nim
20:49:14FromDiscord<kodkuce> why stupit vscode color .high on seq i hate it am allwies typing .len-1 just to envade it
20:49:42*solitudesf quit (Ping timeout: 256 seconds)
20:49:53FromDiscord<Rika> wdym?
21:01:18*pietroppeter quit (Quit: Connection closed for inactivity)
21:05:41shashlickwho wants a 57k line wrapper of gtk+-3.0
21:05:44FromDiscord<Elegant Beef> Are you using nim-alt or the official nim?
21:05:48FromDiscord<Elegant Beef> Uhh
21:05:50FromDiscord<Elegant Beef> Not me
21:05:58disruptekamateur.
21:06:25shashlicktakes 7 seconds to generate but for some reason, Nim takes 70 seconds to compile it
21:06:44shashlick5k const values but still doesn't explain it
21:06:44disruptekget a real computer.
21:06:51FromDiscord<Elegant Beef> Give your nim VM some cocaine, to speed it up
21:07:12FromDiscord<kodkuce> sorry was alt tab and no headphones on head 🙂 , i am ussing offical nim
21:07:22FromDiscord<Elegant Beef> Try nim alt for nicer highlighting
21:07:48FromDiscord<Elegant Beef> https://media.discordapp.net/attachments/371759389889003532/728718658620096512/unknown.png
21:08:13FromDiscord<kodkuce> https://media.discordapp.net/attachments/371759389889003532/728718761171091477/simplescreenrecorder-2020-07-03_23.06.17.webm
21:08:20FromDiscord<kodkuce> ye atm i get this shit one
21:10:04FromDiscord<kodkuce> i need to unstiall officla right?
21:10:47FromDiscord<Elegant Beef> Probably
21:11:22FromDiscord<kodkuce> yep got it working
21:12:34*a_chou joined #nim
21:12:56shashlickhttps://gist.github.com/genotrance/755a1aff57989840f867a03015592aa8
21:13:17shashlickthat was good - fixed some nimterop bugs in the process
21:15:13*a_chou quit (Client Quit)
21:25:59*vicfred quit (Quit: Leaving)
21:26:13*theelous3 quit (Quit: is outty)
21:26:14*theelous3_ quit (Quit: is outty)
21:29:53*hyiltiz_ joined #nim
21:39:11FromDiscord<Technisha Circuit> Is there a module that allows interfacing with Nim with Java that generates a jar file?
21:39:34*kenran quit (Ping timeout: 256 seconds)
21:42:21FromDiscord<codic> Just why
21:43:14FromDiscord<codic> There's something called JNim, https://github.com/yglukhov/jnim, but that allows you to use Java from Nim, not vice versa, and does not generate a JAR
21:43:23FromDiscord<Technisha Circuit> Oh okay
21:43:35FromDiscord<codic> You can wrap the C functions exported by Nim's compile-to-C target in a header and use that with JNI
21:43:38FromDiscord<Technisha Circuit> How would i use it to make an MC plugin? :P
21:43:40FromDiscord<codic> (edit) 'You can wrap the C functions exported by Nim's compile-to-C target in a header and use that with JNI ... ' => 'You can wrap the C functions exported by Nim's compile-to-C target in a header and use that with JNIto use NIm from C'
21:43:42FromDiscord<codic> (edit) 'NIm' => 'Nim'
21:43:51FromDiscord<codic> Uh, I don't think you can
21:43:59FromDiscord<codic> That doesn't run on the JVM, it only interfaces with the JVM
21:44:09FromDiscord<Technisha Circuit> Damn ir
21:44:10FromDiscord<Technisha Circuit> It*
21:44:15FromDiscord<codic> I don't think there's a version of nim that runs on the JVM
21:44:52FromDiscord<Technisha Circuit> Note to self, make an easier way to generate a jar file from Nim code using Jnim
21:45:06FromDiscord<codic> That's impossible...
21:45:14FromDiscord<codic> You'd need to rewrite Nim to run on the JVM
21:45:18FromDiscord<codic> You can't use Jnim for that
21:45:40*thomasross joined #nim
21:45:59FromDiscord<codic> I'm pretty sure you couldn't, at least
21:46:51FromDiscord<Technisha Circuit> Hm
21:46:54shashlickWhy does it need to run on the jvm
21:47:13FromDiscord<Technisha Circuit> For a making a Minecraft plugin :P
21:47:29shashlickYou just want it to be callable by Java right
21:47:54FromDiscord<codic> Minecraft plugins have to be jar files
21:48:04FromDiscord<codic> At least with most of the popular plugin engines
21:48:18shashlickSure that doesn't mean it has to run in the jvm
21:48:25FromDiscord<codic> Yeah
21:48:30FromDiscord<Technisha Circuit> I'm planning on doing it with spigot
21:48:35FromDiscord<codic> As long as it's a working JAR, I guess
21:48:40FromDiscord<codic> But aren't all JARs running on the jvm?
21:48:49FromDiscord<codic> Unless they aren't jars and just have the wrong file extension
21:49:00FromDiscord<codic> Since jars depend on the jvm to run
21:49:01FromDiscord<Technisha Circuit> > You just want it to be callable by Java right↵As long as i can actually interface with the spigot plugin api
21:49:12FromDiscord<codic> Wait
21:49:40FromDiscord<codic> Write java code that uses JNI to interface with C compiled from Nim, and use the plugin API in that Nim using Jnim
21:49:49FromDiscord<codic> That will 999999999% not work
21:49:52FromDiscord<codic> Aka your speciality
21:49:57FromDiscord<Technisha Circuit> Lmao
21:50:11FromDiscord<Technisha Circuit> Thanks for the confidence boost man-
21:50:33FromDiscord<codic> If that works, you can wrap it in an API↵I'm saying that you get stuff that isn't supposed to work to work, that's good :p
21:50:54FromDiscord<Technisha Circuit> G: xD
21:50:59FromDiscord<Technisha Circuit> (edit) removed 'G:'
21:51:15FromDiscord<Technisha Circuit> So, you wanna help me do this stupid thing then?-
21:51:31FromDiscord<codic> Sure?
21:51:36FromDiscord<Rika> not gonna lie
21:51:50FromDiscord<Rika> internally (in my head) Technisha and codic are one person
21:52:07FromDiscord<Rika> it sure sounds like you two are one person
21:52:11FromDiscord<Technisha Circuit> We aren't xD
21:52:24FromDiscord<codic> What if one of the accounts is just an alt account
21:52:25FromDiscord<Technisha Circuit> I'm an idiot
21:52:27FromDiscord<Rika> i have a difficult time believing that
21:52:29FromDiscord<Technisha Circuit> He isn't
21:52:31FromDiscord<codic> Welp
21:52:32FromDiscord<Technisha Circuit> Lmao
21:52:48FromDiscord<codic> (edit) 'account' => 'account?'
21:52:52FromDiscord<Technisha Circuit> So myself, wanna help me-
21:52:59FromDiscord<codic> @Technisha Circuit You are an idiot
21:53:03FromDiscord<codic> There, I just called myself an idiot
21:53:10FromDiscord<Technisha Circuit> Thank you me :)
21:53:24FromDiscord<codic> No problem me!
21:54:11FromDiscord<Technisha Circuit> How is it where i live myself?
21:54:39FromDiscord<Technisha Circuit> I think we broke @Rika via confusion-
21:54:52FromDiscord<Technisha Circuit> And i honestly wouldn't be surprised lmao
21:54:54*pietroppeter joined #nim
21:55:12*hyiltiz_ quit (Quit: hyiltiz_)
21:56:27FromDiscord<Technisha Circuit> Oof Codic isn't responding-
21:56:51FromDiscord<Rika> no i'm just trying to figure out my application's plugin system
21:57:06FromDiscord<Technisha Circuit> O
21:57:08FromDiscord<Technisha Circuit> Oki
21:59:02FromDiscord<Technisha Circuit> Oh YeAh ThAt'S mY aLt GuYs-
22:00:54*fanta1 joined #nim
22:05:12*arecaceae quit (Remote host closed the connection)
22:05:45*arecaceae joined #nim
22:11:54vr0nsorry for the delay. Here is a link to the code itself: https://pastebin.com/9aWKK9Da
22:12:08vr0nand the nimble file: https://pastebin.com/WZ34Z9gM
22:12:33vr0nthe issue is with the proc "main" when i call prompt.clear()
22:12:53vr0n(this is the issue with unicodedb error from earlier. Sorry it took so long, I had to step out
22:30:30*krisppurg joined #nim
22:30:46*stefantalpalaru_ joined #nim
22:32:47*stefantalpalaru quit (Ping timeout: 272 seconds)
22:35:22*sschwarzer joined #nim
22:36:26*sschwarzer quit (Client Quit)
22:37:03*stefantalpalaru_ is now known as stefantalpalaru
22:37:16*stefantalpalaru quit (Changing host)
22:37:16*stefantalpalaru joined #nim
22:39:49*a_chou joined #nim
22:40:55*a_chou quit (Client Quit)
22:41:17*a_chou joined #nim
22:45:13*a_chou quit (Client Quit)
23:11:12FromDiscord<codic> yes i'm totally @Technisha Circuit's alt /s
23:12:09FromDiscord<Technisha Circuit> xD
23:12:38FromDiscord<Technisha Circuit> Okay me, let's get the Spigot plugin in Nim working!
23:13:22FromDiscord<codic> I'm not doing it now
23:15:08FromDiscord<codic> Sorry
23:15:10FromDiscord<codic> (edit) 'Sorry' => 'Sorry, me'
23:16:33*nikita` quit (Quit: leaving)
23:20:42FromDiscord<Technisha Circuit> Oof okay me
23:22:54*fanta1 quit (Quit: fanta1)
23:31:12FromDiscord<demotomohiro> @lmariscal↵This PR has been merged to nimgl/imgui but not to nimgl/nimgl repository.↵https://github.com/nimgl/imgui/pull/2
23:31:13disbotFix compile error from nim cpp tests/test.nim
23:43:54*fredrikhr quit (Ping timeout: 240 seconds)
23:44:38*nkoz quit (Ping timeout: 264 seconds)
23:50:24*NimBot joined #nim
23:56:59FromDiscord<𝓑𝓮𝓷𝓾𝓶𝓫𝓮𝓭> Hey a while back I could have sworn I saw a list of needed/wanted Nim libraries/integrations, but for the life of me I can't find it. Does anyone know what I'm talking about and have a link?
23:59:42FromDiscord<exelotl> oh yeah that sounds familiar...