<< 24-07-2023 >>

00:00:09FromDiscord<turtlebasket> well in this case it's a table of primitives so all lowercase except the `Table`
00:42:17*rockcavera joined #nim
01:01:29FromDiscord<bostonboston> In reply to @haywiressc "Can nim be used": Nimscript is basically Nim but without the use of importc, not that that's how its defined just a side effect of the nvm (if I understand nimscript correctly)
01:02:12FromDiscord<Elegantbeef> What do you mean @haywiressc ?
01:10:45FromDiscord<uninnocent> how can I zip up directories without having the directory appear inside of it
01:11:09FromDiscord<uninnocent> Like if I zip putty/putty.exe, I don't want the zip to contain putty/putty.exe, I just want it to contain putty.exe
01:24:58*azimut quit (Ping timeout: 240 seconds)
01:31:16NimEventerNew Nimble package! nimautogui - Moving the mouse around in nim inspired by python's pyautogui. Windows Only, see https://github.com/Cooperzilla/nimautogui
01:33:08FromDiscord<huantian> In reply to @uninnocent "Like if I zip": what zip library are you using?
01:34:23FromDiscord<uninnocent> In reply to @huantian "what zip library are": zipfiles
01:34:26FromDiscord<uninnocent> zippy
01:34:35FromDiscord<uninnocent> @huantian
01:43:13FromDiscord<huantian> uhhh you'd probably want to iterate throuogh the contents of said folder and add each item individually
01:50:06FromDiscord<huantian> looking at the code for createZipArchive
01:50:27FromDiscord<huantian> you would probably want to use addFile
01:52:43FromDiscord<huantian> sent a code paste, see https://play.nim-lang.org/#ix=4Blh
01:52:44FromDiscord<huantian> as a very loose example
02:06:11FromDiscord<uninnocent> let me try it out 🙂
02:07:55FromDiscord<uninnocent> addFile, addDir, and dirExists aren't valid functions
02:13:38FromDiscord<uninnocent> this worked perfectly after some modifications. All I needed to change was file to file.path, since addDir requires an archive and a string.
02:35:57FromDiscord<turtlebasket> Is there any documentation out there on how to use filters? Getting the following error using `asyncpg`\:↵`Error: expression 'read(cast[typeof(execAsync(conn, s, 0, nil, nil, nil, nil, 0, true))](internalTmpFuture`gensym8))' is of type 'apgResult' and has to be used (or discarded)\`
02:36:36FromDiscord<turtlebasket> Is there any documentation out there on how to use filters? Getting the following error using `asyncpg`\:↵`Error: expression 'read(cast[typeof(execAsync(conn, s, 0, nil, nil, nil, nil, 0, true))](internalTmpFuture\`gensym8))' is of type 'apgResult' and has to be used (or discarded)\`
02:37:01FromDiscord<turtlebasket> Is there any documentation out there on how to use futures? Getting the following error using `asyncpg`\:↵`Error: expression 'read(cast[typeof(execAsync(conn, s, 0, nil, nil, nil, nil, 0, true))](internalTmpFuture\`gensym8))' is of type 'apgResult' and has to be used (or discarded)\`
02:39:10FromDiscord<Elegantbeef> Are you trying to return it?
03:10:36FromDiscord<gogolxdong666> Why does nimble 0.14.2 fail to find any library version?
03:11:18FromDiscord<Elegantbeef> you might need to delete your pkgs2 folder
03:12:19FromDiscord<gogolxdong666> the same issue
03:23:50FromDiscord<terrygillis> how do you create sections that contain specific procs or types in docs? I tried `## Heading` followed by `## -------` but all the procs still clump under the `Procs` section while the `Heading` is empty
03:27:31FromDiscord<gogolxdong666> Is nimble broken or something else ?
03:28:15FromDiscord<Elegantbeef> Not anymore than it normally is
03:28:31FromDiscord<Elegantbeef> I don't think you can group docs together
03:30:25FromDiscord<gogolxdong666> which docs
03:30:59FromDiscord<Elegantbeef> Some people really need to realise the wolrd isnt all about them
03:33:37FromDiscord<terrygillis> Oh sorry me I would just ask less 😞
03:33:59FromDiscord<Elegantbeef> I was joking due to gogolx's response
03:34:56FromDiscord<gogolxdong666> haha ,due to my every question and response
03:37:34FromDiscord<terrygillis> ah I thought I was unduly bothering the chat, as is the usual case with my friends and work 🙂
03:38:00FromDiscord<gogolxdong666> questions are more than docs
03:39:03FromDiscord<gogolxdong666> except looking into the source code
03:40:07FromDiscord<gogolxdong666> I assume someone else met the same issue except I'm the luckiest.
03:41:48FromDiscord<Elegantbeef> You can try deleting the `pkgs` file aswell
03:42:05FromDiscord<Elegantbeef> I know nimble 0.14 did not beave nicely intially
03:42:10FromDiscord<Elegantbeef> Alternatively update your devel
03:44:48FromDiscord<terrygillis> Is there a way to make constructor procs appear together and first (other than naming them with the same first letter)? They are just everywhere which makes it really hard to find
03:44:59FromDiscord<Elegantbeef> Nope
03:46:37FromDiscord<Elegantbeef> I believe the devel compiler puts overloads next to eachother though
03:47:29FromDiscord<Elegantbeef> https://nim-lang.github.io/Nim/tables.html#%5B%5D%2CTable%5BA%2CB%5D%2CA_2 yea seems like it
03:47:58FromDiscord<Elegantbeef> Seems even stable puts overloads together
03:48:35FromDiscord<Elegantbeef> So as long as you do `proc init(_: typedesc[T],...): T` it'll show up where you want
03:49:55FromDiscord<terrygillis> oh yes thanks
04:34:39FromDiscord<terrygillis> can `when` (I suppose compile-time `if`) have an else clause?
04:34:50FromDiscord<Elegantbeef> Yes
04:35:02FromDiscord<Elegantbeef> https://nim-lang.org/docs/manual.html#statements-and-expressions-when-statement
04:43:37FromDiscord<uninnocent> How do I read and write icons in nim?
04:43:47FromDiscord<uninnocent> Specifically on windows
05:37:02FromDiscord<michaelb.eth> In reply to @uninnocent "Specifically on windows": Use `rcedit —set-icon`, put that build step/command in a Makefile or something
05:37:36FromDiscord<uninnocent> In reply to @michaelb.eth "Use `rcedit —set-icon`, put": Nono, I don't mean setting the icon of the nimlang executable
05:37:42FromDiscord<uninnocent> I mean like edititing the icon of other files
05:38:20FromDiscord<michaelb.eth> Okay, the shell out from nim and in the shell invoke rcedit
05:38:30FromDiscord<michaelb.eth> (edit) "the" => "then"
05:38:44FromDiscord<uninnocent> 'rcedit' is not recognized as an internal or external command,↵operable program or batch file.
05:38:45FromDiscord<michaelb.eth> might need admin privs
05:39:14FromDiscord<michaelb.eth> https://github.com/electron/rcedit
05:39:35FromDiscord<michaelb.eth> sorry, forgot it’s not a built-in tool on Windows
05:39:41FromDiscord<uninnocent> So i'll need an external utility? There's absolutly no way to do it in pure nim?
05:39:47Amun-Rano
05:39:52Amun-Rathis is ms
05:40:03FromDiscord<michaelb.eth> If you study how it works you can probably wrap the same win apis in Nim
05:40:14FromDiscord<michaelb.eth> (edit) "win" => "Win"
05:40:31FromDiscord<uninnocent> setting icon works, but how about reading it?
05:40:44FromDiscord<uninnocent> same thing?
05:40:46FromDiscord<uninnocent> -get-icon
05:41:07FromDiscord<michaelb.eth> Not sure, I think I only ever used it to “set”
05:41:15FromDiscord<michaelb.eth> check it’s docs
05:41:16Amun-Raiirc rcedit does not support exporting an icon
05:41:21FromDiscord<michaelb.eth> (edit) "it’s" => "its"
05:41:29FromDiscord<uninnocent> In reply to @Amun-Ra "iirc rcedit does not": Damn, it doesn't work for me then
05:41:33Amun-Rahttps://learn.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-extracticona
05:42:11FromDiscord<michaelb.eth> there you go, should be able to wrap that with Nim importc
05:42:16Amun-Rathere's also https://pypi.org/project/icoextract/
05:42:27FromDiscord<uninnocent> that's python though
05:42:53FromDiscord<uninnocent> Also, how do I re-install nimlang with choosenim?
05:42:59FromDiscord<uninnocent> I fucked up some files and I need to start clean
05:44:44FromDiscord<michaelb.eth> sent a code paste, see https://play.nim-lang.org/#ix=4Bm8
05:45:00FromDiscord<uninnocent> And how do I see my versions?
05:45:10Amun-Ranim -V
05:45:12FromDiscord<michaelb.eth> choosenim versions
05:47:06FromDiscord<uninnocent> sent a long message, see http://ix.io/4Bma
05:47:19FromDiscord<uninnocent> sent a long message, see http://ix.io/4Bmb
05:47:32FromDiscord<uninnocent> (edit) "sent a long message, see http://ix.io/4Bmb" => "Channel: stable (update available!)↵↵ Installed:↵ 1.6.12 (latest)"
06:40:28*PMunch joined #nim
06:42:20FromDiscord<Elegantbeef> Well pmunch I got bored and implemented the first part of the whole nimscript as a C library https://github.com/beef331/nimscripter/blob/752c670fdd403bf05d15746102b1d22a8ff3ab6e/tests/lib/helloworld.c 😄
06:50:07PMunchOooh
06:50:11PMunchVeeery nice
07:00:07*ntat joined #nim
07:29:02FromDiscord<djazz> PMunch: had time to look at https://github.com/PMunch/futhark/pull/78 yet?
07:42:41PMunchHadn't had time until now
07:42:44PMunchJust made a comment
07:43:44PMunchElegantbeef, what are all the arguments there?
07:43:59PMunchYou haven't even named them in your .h file :O
07:44:33FromDiscord<Elegantbeef> isnt `t bleh` illegal C inside an extern procedure?
07:45:04FromDiscord<Elegantbeef> https://github.com/beef331/nimscripter/blob/752c670fdd403bf05d15746102b1d22a8ff3ab6e/src/nimscripter/nimscr.nim#L125-L132 it's just this stuff anyway
07:46:11PMunchHmm, quite possible. Haven't used extern a whole lot
07:46:47PMunchI see, that make it clearer
07:47:53PMunchHmm, does Nim assume a reference when it returns something?
07:48:09PMunchI see you use GC_unref in the destroy procedure, but no call to GC_ref
07:51:45FromDiscord<Elegantbeef> It's a returned value it should increment the count afaik
07:53:25PMunchHmm, that's interesting. I guess there are some libraries out there interfacing with C which messes that up..
07:54:29FromDiscord<Elegantbeef> I will need to run it with valgrind to be sure though 😄
07:56:29FromDiscord<Elegantbeef> I mean I guess even if it doesnt increment the count, arc/orc will not kick in inside a procedure that returns a ref for obvious reasons
07:56:56FromDiscord<Elegantbeef> Doesnt make much sense to attempt to free the ressult variable
08:57:32PMunchTrue
08:58:27PMunchI was more thinking of scenarios like `discard someProc()`. But I guess the discard is where ARC/ORC kicks in
09:26:25*PMunch_ joined #nim
09:29:35*PMunch quit (Ping timeout: 250 seconds)
09:30:18PMunch_Hmm, interesting
09:31:00PMunch_The Playground docker images fails to install Norm with `taskRequires` not being recognized
09:31:08PMunch_In the Nimble file that is
09:31:25PMunch_But taskRequires is available in 0.14.2, so it should be valid?
09:31:30*PMunch_ is now known as PMunch
09:35:25PMunchHmm, for some reason it has nimble 0.13.0
09:39:09PMunchAha, koch has 0.13.0 hard coded into it for some reason: https://github.com/nim-lang/Nim/blob/v1.6.14/koch.nim#L13
11:03:32*ttkap quit (Ping timeout: 240 seconds)
11:04:29*lucasta joined #nim
11:27:17*azimut joined #nim
12:48:17*jmdaemon quit (Ping timeout: 244 seconds)
13:32:49FromDiscord<ieltan> Is there a way to accomplish the endgoal of https://github.com/nim-lang/Nim/pull/11754 with current Nim? I wish to be able to access user defined symbols (ex: a global ref) from library code.
13:35:16PMunchBy using a template?
13:36:45PMunchA little something like this: https://play.nim-lang.org/#ix=4Bna
13:36:57PMunchMight have to label that template dirty though, but I don't think so
14:02:12FromDiscord<juan_carlos> Whats the smallest code that can produce an intended leak with ARC and ORC?, one-liner better, for testing purposes. 🤔
14:02:34FromDiscord<treeform> In reply to @Elegantbeef "<@714152700920594493>\: that's actually treeforms": Hey sorry about that, we have stopped using Nim Docs, and now use github actions instead. Here is how you can setthem up: https://github.com/nim-lang/bigints/issues/125
14:05:23FromDiscord<ieltan> sent a code paste, see https://play.nim-lang.org/#ix=4Bnk
14:07:03FromDiscord<ieltan> `send` would be used by the user as well
14:10:34FromDiscord<bung8954> In reply to @treeform "Hey sorry about that,": ok,then @elegantbeef need update the repo readme
14:20:26*PMunch quit (Quit: Leaving)
14:21:52*disso-peach joined #nim
14:48:05FromDiscord<.matrixagent> guys is it advisable to use treeform's websocket in production?
15:05:27FromDiscord<michaelb.eth> In reply to @.matrixagent "guys is it advisable": You can also consider nim-websock, which is used in production at considerable scale: https://github.com/status-im/nim-websock
15:07:51FromDiscord<.matrixagent> In reply to @michaelb.eth "You can also consider": will it scale to 500k concurrent connections?
15:08:32FromDiscord<.matrixagent> on hardware with 8 vcpu and 32 gb of ram
15:08:38FromDiscord<michaelb.eth> Not sure, you might be the first to try to use it at a scale like that
15:09:08FromDiscord<.matrixagent> im only a single developer doing a full stack application so i really cant afford to risk it with nim
15:11:23FromDiscord<.matrixagent> and i also dont know how the garbage collector would perform since its a real time app
15:11:26FromDiscord<michaelb.eth> Remember that Nim is a small community/ecosystem and a lot of things are therefore pretty theoretical when it comes to doing large-scale prod stuff with Nim, i.e. there’s not a lot of precedent apart from Status’s nimbus-eth2, nim-libp2p, and related libraries/projects
15:12:22FromDiscord<michaelb.eth> So to choose Nim for a big production project involves making some bets, taking risks, 100% for sure
15:13:12FromDiscord<michaelb.eth> If you don’t want risk for the kind of thing it sounds like you’re working on, you may need to consider Erlang or JVM
15:13:40FromDiscord<nervecenter> Yeah large numbers of concurrents is basically what BEAM was built for
15:13:43FromDiscord<.matrixagent> jvm is disgusting for real time apps
15:13:44FromDiscord<nervecenter> Maybe try Elixir
15:13:55FromDiscord<.matrixagent> i thought about C++
15:14:02FromDiscord<michaelb.eth> But if you stick with Nim the community here will be happy to help you learn
15:14:35FromDiscord<.matrixagent> i can show you a diagram of what im trying to build
15:14:42FromDiscord<.matrixagent> if you'd like
15:15:01FromDiscord<.matrixagent> In reply to @nervecenter "Yeah large numbers of": what is BEAM?
15:15:10FromDiscord<nervecenter> The Erlang virtual machine
15:15:25FromDiscord<nervecenter> Elixir also compiles to BEAM
15:15:42FromDiscord<nervecenter> It's highly parallelized and fault-tolerant
15:15:46FromDiscord<.matrixagent> what comapnies use it?
15:15:53FromDiscord<michaelb.eth> Big and small
15:15:56FromDiscord<nervecenter> Quite a few, including Discord iirc
15:16:54FromDiscord<michaelb.eth> In reply to @.matrixagent "jvm is disgusting for": I mean HFT firms use JVM, so super low latency is definitely possible with it, with tuning and experimentation
15:17:08FromDiscord<michaelb.eth> (edit) "In reply to @.matrixagent "jvm is disgusting for": I mean ... HFT" added "some"
15:17:20FromDiscord<.matrixagent> i think it depends of the JVM
15:17:37FromDiscord<.matrixagent> heard graalvm provide low latency guarantees
15:18:17FromDiscord<.matrixagent> and also nim is gonna be a huge headache to find devs for
15:19:04FromDiscord<michaelb.eth> Open J9 from IBM is known for low latency, it’s open source and there are OpenJDK builds with it
15:19:08FromDiscord<nervecenter> Yes but if you introduce devs to it they might end up loving it, I would imagine it's pretty common that people end up working in languages and with tools they didn't learn before the job search
15:19:08FromDiscord<michaelb.eth> https://bell-sw.com/announcements/2022/06/28/hotspot-vs-openj9-performance-comparison/
15:19:59FromDiscord<nervecenter> I was hired to replace a bunch of old C and PHP code, and it turns out Nim was a perfect fit, I was originally using Python
15:20:55FromDiscord<michaelb.eth> In reply to @.matrixagent "and i also dont": If you can avoid cycles in your programs then you can go with Nim’s ARC, which has extremely low overhead
15:21:13FromDiscord<.matrixagent> In reply to @michaelb.eth "If you can avoid": there is no cycles in the program
15:21:14FromDiscord<.matrixagent> at all
15:21:30FromDiscord<michaelb.eth> Okay then you can use ARC
15:21:49FromDiscord<.matrixagent> i think im gonna take the risk and use nim
15:21:53FromDiscord<michaelb.eth> if you want to go with Nim, I mean
15:22:30FromDiscord<.matrixagent> since java works in a really strange way
15:22:46FromDiscord<.matrixagent> for some reason the jvm just fills up all the heap it has first then starts to free stuff
15:23:58FromDiscord<bostonboston> You should be able to manipulate the jvm to free objects or run it's gc more often before it runs out of heap
15:24:11FromDiscord<griffith1deadly> In reply to @.matrixagent "since java works in": true
15:24:20FromDiscord<griffith1deadly> i'm jvm dev but love nim
15:26:03FromDiscord<nervecenter> In reply to @.matrixagent "i think im gonna": Also keep in mind that Nim strongly prefers the stack, for example seqs and tables are of course allocated in heap memory but are managed by a stack pointer. So if you're careful, you'll have very, very few heap objects needing GC/RC cleanup.
15:26:24FromDiscord<.matrixagent> In reply to @nervecenter "Also keep in mind": amazing! even better performance
15:26:26FromDiscord<demotomohiro> In reply to @.matrixagent "will it scale to": Even if you got a best performant server program, is it possible to scale it to 500k concurrent connections on such hardware?↵Can one machine have more than 65535 ports?↵Or it can scale without using 500k ports?
15:26:38FromDiscord<.matrixagent> In reply to @demotomohiro "Even if you got": oat++ does it
15:26:49FromDiscord<.matrixagent> it scales to 2 million connections on a single server
15:26:59FromDiscord<.matrixagent> even 5 million on a better server
15:27:11FromDiscord<.matrixagent> i dont want to use C++ because of all the problems it has
15:27:35FromDiscord<.matrixagent> would rather run slow than wake up to a segfault somewhere in production
15:28:56FromDiscord<demotomohiro> In reply to @.matrixagent "it scales to 2": Oh i didn't know that.
15:29:03FromDiscord<.matrixagent> https://oatpp.io/benchmark/websocket/2-million/
15:29:39FromDiscord<nervecenter> Only segfaults I've ever had was interfacing with C libraries, make sure you understand all the compatible types if you use C libraries (for example, there is a distinction between `cuint` and `csize_t`)
15:29:49FromDiscord<griffith1deadly> In reply to @.matrixagent "it scales to 2": maybe you need try mummy?
15:29:52FromDiscord<griffith1deadly> https://forum.nim-lang.org/t/10066
15:30:43FromDiscord<.matrixagent> In reply to @nervecenter "Only segfaults I've ever": not just that, in C++ its far too easy to make accidental UB
15:32:39FromDiscord<demotomohiro> In reply to @.matrixagent "https://oatpp.io/benchmark/websocket/2-million/": > Client application opens 20k connections on each port,↵So it can make more than 65k connection on single machine as they can open multiple connections on single port.
15:32:40FromDiscord<.matrixagent> In reply to @griffith1deadly "maybe you need try": will definitely consider it!
15:34:58FromDiscord<.matrixagent> In reply to @demotomohiro "> Client application opens": 65,535 65k = 4,259,775?
15:35:47FromDiscord<.matrixagent> will probably use freebsd not linux in production
15:46:36FromDiscord<jmgomez> In reply to @.matrixagent "i dont want to": or wrap oat++ and have the best of both worlds
15:59:18FromDiscord<_gumbercules> I use Elixir at work
15:59:35FromDiscord<_gumbercules> In reply to @.matrixagent "what comapnies use it?": I use Elixir at work
16:00:20FromDiscord<_gumbercules> and I've been using Nim for quite a while as well
16:00:53FromDiscord<_gumbercules> Not sure what you're building but there are most definitely cases where I'd choose one over the other
16:13:19FromDiscord<.matrixagent> In reply to @_gumbercules "Not sure what you're": im building an order ahead of time app
16:13:51FromDiscord<.matrixagent> the issue is with checking status of orders and making the restaurant get orders in real time thats why im using websockets
16:24:00FromDiscord<bostonboston> sent a code paste, see https://play.nim-lang.org/#ix=4BnR
16:24:06FromDiscord<bostonboston> Is there a std lib iterator that does this
16:30:40*rockcavera quit (Remote host closed the connection)
16:44:06*lucasta quit (Quit: Leaving)
16:44:26FromDiscord<that_dude.> Not an iter, but is there an issue with https://nim-lang.org/docs/sequtils.html#zip%2C%2C
16:48:14FromDiscord<that_dude.> sent a code paste, see https://play.nim-lang.org/#ix=4BnV
16:48:28FromDiscord<that_dude.> (edit) "https://play.nim-lang.org/#ix=4BnV" => "https://play.nim-lang.org/#ix=4BnW"
16:48:42FromDiscord<that_dude.> It looks like zip be default truncates the longer seq
16:49:08FromDiscord<nnsee> In reply to @bostonboston "Is there a std": what's wrong with this one
16:50:29FromDiscord<that_dude.> (edit) "be" => "by"
16:54:08FromDiscord<bostonboston> In reply to @nnsee "what's wrong with this": I wrote it
16:58:31FromDiscord<user2m> sent a code paste, see https://play.nim-lang.org/#ix=4Bo3
16:59:40FromDiscord<.matrixagent> In reply to @griffith1deadly "maybe you need try": after trying it out, its very easy to use and its nice to work with
16:59:57FromDiscord<.matrixagent> even a monkey can understand how to use it
17:17:51FromDiscord<djazz> In reply to @user2m "Any tips for building": The instructions are for the source tarball. You downloaded the compiled one, so run install.sh i guess?
17:18:01FromDiscord<djazz> Wait
17:18:12FromDiscord<djazz> You downloaded x86_x64 nim, that wont work
17:19:51FromDiscord<djazz> Download this <https://nim-lang.org/download/nim-1.6.14.tar.xz>
17:20:15FromDiscord<djazz> Then you can follow the build instructions
17:21:17FromDiscord<user2m> In reply to @djazz "The instructions are for": Yup I JUST realized that! I'm a windows guy just trying his best lol
17:26:59*NimEventer quit (Ping timeout: 264 seconds)
17:27:18*NimEventer joined #nim
17:31:50FromDiscord<bostonboston> In reply to @that_dude. "It looks like zip": I think my solution will just be to use zip were I have my for loop, looking similar to `for (x,y) in zip(seq1, seq2(:
17:32:03FromDiscord<bostonboston> (edit) "seq2(:" => "seq2):`"
17:37:45FromDiscord<nnsee> In reply to @bostonboston "I wrote it": seems good to me 😅
17:45:26FromDiscord<bostonboston> Glad someone appreciates my code
17:50:31*rockcavera joined #nim
17:54:07FromDiscord<demotomohiro> In reply to @user2m "Yup I JUST realized": https://github.com/nim-lang/nightlies/releases↵If you want to install nim on raspberry pi, you can get prebuilt binary for arm64/armv7l.
18:03:08*ChanServ quit (shutting down)
18:15:07FromDiscord<monark.chan> What's the Nim equivalent to playwright
18:30:15*junaid_ joined #nim
18:30:37*junaid_ quit (Client Quit)
18:31:46*junaid_ joined #nim
18:43:10*junaid_ quit (Remote host closed the connection)
19:00:06FromDiscord<_gumbercules> In reply to @.matrixagent "the issue is with": If you're building a web. application, I'd use Elixir honestly
19:00:15FromDiscord<_gumbercules> (edit) "web." => "web"
19:00:59FromDiscord<_gumbercules> You're going to have a lot less friction from the jump with Elixir than you will with Nim in that space - if you really want to use Nim you could use it as a replacement for JS on the frontend. It should be pretty trivial to write a custom `mix` task to compile your Nim code to JS
19:01:53FromDiscord<_gumbercules> If you want static typing you could use Gleam, although static typing I believe is currently being experimented with for Elixir so I imagine at some point it will appear.
19:04:54FromDiscord<_gumbercules> If you were building a native desktop or mobile app, I'd say go for Nim over Elixir but since you're targeting the web, I hesitate. I'm currently building a web application using Elixir and Phoenix and it's hosting a Nim application that I'm compiling to wasm via emscripten. I'm quite happy I chose Elxir for the backend and FYI I'm using websockets and webrtc data channels in my project.
19:06:11FromDiscord<_gumbercules> Phoenix LiveView actually sounds very much like what you're after in terms of your requirements: https://github.com/phoenixframework/phoenix_live_view
19:07:16FromDiscord<_gumbercules> and of course, there's nothing stopping you from calling some compiled Nim code from Elixir via NIFs - if you have some cpu intensive work that you think would perform better if it was written in Nim, it's not hard to incorporate the two.
19:14:39FromDiscord<_gumbercules> sent a long message, see http://ix.io/4BoK
19:15:09FromDiscord<_gumbercules> Also - if you want to use Nim, more power to you - just be prepared for a rougher ride and to have to roll up your sleeves and bring your own implementation in some areas.
19:15:21FromDiscord<odexine> i think youre pretty spot on
19:17:08FromDiscord<jviega> No the echosystem is pretty baren. Good luck finding a decent library just to write to an s3 bucket, which is basic table stakes in the tech world
19:18:29FromDiscord<_gumbercules> Yeah - like I'm sure it's out there for ^ but you're going to find probably 5-10 libraries that have some type of AWS s3 stuff in them, maybe one of them works and it probably isn't using any SDK but is using the http api and is insanely complex to wir eup
19:18:34FromDiscord<_gumbercules> (edit) "wir eup" => "wire up"
19:18:52FromDiscord<_gumbercules> with elixir it's install `ExAws` add a few lines to your `config.exs` file and start making requests
19:19:20FromDiscord<_gumbercules> (edit) "install" => "add" | "add`ExAws` ... add" added "to the `deps` block in your `mix.exs` file,"
19:19:42FromDiscord<jviega> No, there are like 4 that are outdated and don't do much and 1 that is auto-generated and undocumented that might possibly work maybe?
19:20:23FromDiscord<_gumbercules> I think probably disruptek's works
19:20:49FromDiscord<_gumbercules> because he's not an idiot and he tends to keep his shit in a working state most of the time because he dogfoods a lot of his work
19:21:23FromDiscord<_gumbercules> not that all the other authors are idiots, it's just people go into writing aws bindings / libraries beliving it's a more trivial task than it ends up being
19:21:37FromDiscord<_gumbercules> whereas disruptek went in knowing that, and had a strategy for dealing with that from the get go
19:21:46FromDiscord<jviega> Well it's been about 6 months since we went looking, but ended up forking and fixing something that no longer compiled but was the easiest path still
19:21:56FromDiscord<_gumbercules> makes sense
19:22:17FromDiscord<_gumbercules> honestly I haven't looked in a couple of years because I gave up on the idea of using Nim at any job
19:22:42FromDiscord<_gumbercules> in fact I think the idea even started sounding unappealing in most contexts once I started working in Elixir
19:23:11FromDiscord<_gumbercules> when I was working in Java / Python I wanted nothing else - even then though if I had gotten my wish I probably would have been regretting it later
19:23:30FromDiscord<_gumbercules> also, I'm strictly talking web dev jobs - Nim would have been great at several jobs when I worked in games
19:28:03FromDiscord<jviega> Well, I'm using Nim at work. Was probably an okay choice, but boy my opinion is much lower than a when we started in Nov
19:33:58FromDiscord<user2m> In reply to @jviega "Well, I'm using Nim": why's that?
19:34:25FromDiscord<jviega> Lots of reasons, but the poor state of the community is at the core of a lot of them.
19:34:56FromDiscord<jviega> Everyone who has worked on the code base has had major headaches w/ the language.
19:35:19FromDiscord<user2m> In reply to @jviega "Lots of reasons, but": yeah in comparison to the python ecosystem nim is kinda bare. but I'm always surprised at the amt of packages nim has.
19:35:29FromDiscord<user2m> In reply to @jviega "Everyone who has worked": What kind of headaches?
19:35:52FromDiscord<user2m> Im interested in adopting nim as a primary language so id like to know all it's aches n pains
19:37:17FromDiscord<jviega> Oh, many and varied. Brittle and unintuitive syntax in some areas, horrible error messages, cases where nim will try to dynamically load libraries instead of letting you statically link them, ...
19:37:21FromDiscord<jviega> Tons and tons of things.
19:38:07FromDiscord<_gumbercules> In reply to @user2m "Im interested in adopting": I've been using Nim since 2015 and there aren't a lot of people around who can also make that claim.
19:38:12FromDiscord<ieltan> Do you have a blog? Sounds like it's post worthy
19:38:16FromDiscord<_gumbercules> Mostly because people get frustrated and leave for one reason or another
19:39:06FromDiscord<_gumbercules> I think how much you will like Nim largely depends on what you're using it for. I think in call cases, you should expect friction and a lesser than ideal experience vs what you'd find in a more mainstream polished PL.
19:39:07FromDiscord<jviega> Oh, I'll probably post some about it in the near future as the project launches in a few weeks
19:39:26FromDiscord<_gumbercules> Hell, even some PLs that are more niche than Nim have better developer experiences
19:40:16FromDiscord<jviega> That's part of the problem. Nobody cares about good user experience, esp for people to make the transition. People are more than happy to dink around with new memory managers for years on end that add lots of instability, and little new value
19:40:53FromDiscord<ieltan> Nim needs some critique, it's great that people are trying it out and pointing out it's flaws
19:41:08FromDiscord<_gumbercules> I think Nim's power lies in its flexibility and the amount of freedom it allows the programmer. It's also quite a steep learning curve to become proficient and productive to a point where you're not constantly thrown by error messages / figuring out how to do things or why things don't work as you might expect at first.
19:41:10FromDiscord<ieltan> "Bad dev experience" is too broad a statement
19:41:19FromDiscord<jviega> Oh, don't worry, the flaws all get pointed out, but nobody will act on any of it
19:41:53FromDiscord<_gumbercules> In reply to @ieltan ""Bad dev experience" is": What is too broad about it? Nim's developer experience sucks.
19:42:12FromDiscord<ieltan> In reply to @jviega "Oh, don't worry, the": Everybody is waiting for IC to do anything
19:42:39FromDiscord<_gumbercules> Compile times are slow in large projects, there is no REPL, to debug you're reliant on gdb / lldb, nimsuggest leaks like a sieve
19:43:16FromDiscord<_gumbercules> editor support is flaky, docs are meh,
19:43:21FromDiscord<_gumbercules> (edit) "meh," => "meh"
19:43:35FromDiscord<jviega> My team, half of them never even got nimsuggest working reliably
19:43:39FromDiscord<ieltan> Things that we already know then
19:43:43FromDiscord<_gumbercules> There's nothing about Nim's developer experience that makes someone go - damn they nailed this part of it!
19:44:01FromDiscord<jmgomez> I disagree here, tooling definitely lacks but you can get a pretty decent setup and decent compiles times too
19:44:02FromDiscord<ieltan> It's been this way for a long time because "IC will solve everything"
19:44:17FromDiscord<ieltan> (not everything of)
19:44:21FromDiscord<ieltan> (edit) "of)" => "ofc)"
19:44:37FromDiscord<_gumbercules> In reply to @jmgomez "I disagree here, tooling": You shouldn't have to work for these things is the thing
19:45:24FromDiscord<_gumbercules> Developers don't want to pick up a new PL and have to spend a bunch of time coercing the language into behaving properly
19:45:26FromDiscord<jmgomez> yeah, the bottom issue is lack of resources as always
19:45:34FromDiscord<_gumbercules> Well - that or squandered resources
19:45:39FromDiscord<_gumbercules> And lack of care
19:46:20FromDiscord<_gumbercules> After so many dollars and so much time, lack of resources stops really being a workable excuse IMO
19:46:42FromDiscord<jmgomez> from what I have seen since Im around I would say they are kinda well spent though, maybe before was different
19:46:49FromDiscord<_gumbercules> I'm not saying anyone's gotten rich off Nim's development, but I mean, people were sitting on the project and making book profits off it and building personal projects with it while it languished
19:46:50FromDiscord<jviega> Yeah, resources eventually become the problem because priorities were wrong for too long
19:47:11FromDiscord<jmgomez> what I would say is even all of that is lacking, Nim is so good that a lot of people keep around 😛
19:47:22FromDiscord<_gumbercules> and yah, poor decision making was also a factor - we didn't need a Nim forum
19:47:23FromDiscord<_gumbercules> ever
19:47:43FromDiscord<jmgomez> yeah, that I agree. Im just pointing out what I have seen so far
19:48:12FromDiscord<_gumbercules> In reply to @jmgomez "what I would say": there are a lot of good things about Nim
19:48:39FromDiscord<_gumbercules> and Nim could be great, but it's been that way for a long time
19:49:03NimEventerNew thread by koistinen: Using Unicode in procedure and variable names, see https://forum.nim-lang.org/t/10353
19:49:10FromDiscord<jviega> After about 9 months and 90k lines of code, I've concluded the opportunity has been squandered, and the language probably won't even be huge 🙂
19:50:03FromDiscord<jviega> It's too bad I stuck myself with it for a while. I would be reluctant to recommend it to anyone, or to use on anything new.
19:51:07FromDiscord<uninnocent> How can I refresh the file explorer with nim
19:51:19FromDiscord<uninnocent> Like if you right click > refresh, but programatically
19:51:19FromDiscord<_gumbercules> I haven't been spurned that badly by Nim - although I've admittedly said I'm leaving before and then come back after trying out some alternative PL. I gave Rust, Zig and Odin all fair shots. Odin was probably the one I liked the most out of those, but I still missed aspects of Nim. I think if I were to pick a new PL today to explore it'd be Janet.
19:51:31FromDiscord<_gumbercules> In reply to @uninnocent "Like if you right": the same way you do it with the windows api
19:51:41FromDiscord<uninnocent> In reply to @_gumbercules "the same way you": There's an api for that?
19:52:21FromDiscord<_gumbercules> In reply to @uninnocent "There's an api for": https://github.com/khchen/winim
19:52:38FromDiscord<uninnocent> Im trying to disable hide files in the view menu, but when I do I still need to manually refresh
19:52:44FromDiscord<_gumbercules> In reply to @uninnocent "There's an api for": and yes I'm pretty sure there's probably some windows API for refreshing a file tree
19:52:45FromDiscord<uninnocent> In reply to @_gumbercules "https://github.com/khchen/winim": I know winim exists
19:52:56FromDiscord<uninnocent> In reply to @_gumbercules "and yes I'm pretty": File tree, yes, visually refreshing explorer, probably not
19:53:36FromDiscord<_gumbercules> Ah okay, I misread your question then, apologies.
19:53:40FromDiscord<jmgomez> In reply to @_gumbercules "I haven't been spurned": I got into it mostly for NimForUE after failing with Rust
19:53:42FromDiscord<jviega> I was okay w/ C, Python and if neither worked, Go, even though I had problems with all those languages too. Would go back to that. Tho I have a compiler background, and I've been so angered by the whole experience someday I might go build myself a decent systems PL because I don't like Rust or Zig either
19:53:42FromDiscord<_gumbercules> How do other programs do this then?
19:54:24FromDiscord<_gumbercules> In reply to @jviega "I was okay w/": I feel you - you might like Oidin if you like Go
19:54:27FromDiscord<uninnocent> https://media.discordapp.net/attachments/371759389889003532/1133125058647298098/image.png
19:54:27FromDiscord<uninnocent> what the fuck
19:54:31FromDiscord<_gumbercules> Odin even
19:54:53FromDiscord<jmgomez> Well failing, I took a loot at it for two days or so and see the crap google was trying to do to make cpp interop work
19:55:15FromDiscord<jviega> No, Go was the most underwheming in some respects, because of all the money wasted on developing something that's only marginally better than Java.... a quarter century later.
19:56:00FromDiscord<jmgomez> (edit) "see" => "saw"
19:57:50FromDiscord<_gumbercules> In reply to @jmgomez "Well failing, I took": Yeah Nim shines in that area
19:57:54FromDiscord<_gumbercules> and is one of the few languages that does
20:01:03FromDiscord<Elegantbeef> Just re-implement a C++ compiler how hard could it be 😄
20:01:24FromDiscord<_gumbercules> 😄
20:02:32FromDiscord<Elegantbeef> The lengths that carbon is going to avoid just using a C++ compiler is absurd though
20:05:46FromDiscord<juan_carlos> In reply to @Elegantbeef "The lengths that carbon": Has Carbon replaced C++ yet?. 🤔
20:06:44FromDiscord<_gumbercules> There's a new kid on the block now too
20:07:05FromDiscord<_gumbercules> https://www.val-lang.dev/
20:07:27FromDiscord<Elegantbeef> Well juan I'm reading the roadmap for it
20:07:50FromDiscord<Elegantbeef> They want to have C++ interop, but remove the C++ compiler
20:07:59FromDiscord<Elegantbeef> Which means they have to transpile C++ to Carbon
20:08:05*ntat quit (Quit: leaving)
20:08:17FromDiscord<_gumbercules> Should be ez
20:08:21FromDiscord<_gumbercules> C++ is butt simple
20:09:01FromDiscord<_gumbercules> cout >> "done";
20:09:59FromDiscord<Elegantbeef> Meanwhile most languages cannot even transpile C
20:10:05FromDiscord<_gumbercules> there's a syntax error in there
20:10:24FromDiscord<_gumbercules> most languages don't try
20:10:28FromDiscord<_gumbercules> they just use LLVM
20:10:58FromDiscord<Elegantbeef> I mean C -\> Other Language Source
20:11:53FromDiscord<_gumbercules> yeah sure - I just mean most other languages don't have much of a reason to do this because they get C interop for free via LLVM
20:12:10FromDiscord<_gumbercules> and so many languages use LLVM as their backend
20:13:06FromDiscord<Elegantbeef> C's very lax rules make it really difficult
20:13:31FromDiscord<_gumbercules> depends on the abstraction level of the target PL
20:14:00FromDiscord<_gumbercules> and I still think it's probably easier than C++ given the clusterfuck that is C++
20:14:38FromDiscord<_gumbercules> unless you stick to some sane subset of C++ like C++11/14
20:14:43FromDiscord<_gumbercules> then it might be easier
20:20:53*xet7 quit (Ping timeout: 244 seconds)
20:34:31*xet7 joined #nim
20:34:39FromDiscord<nervecenter> sent a long message, see http://ix.io/4Bp1
20:35:09FromDiscord<nervecenter> (edit) "http://ix.io/4Bp1" => "http://ix.io/4Bp2"
20:36:26FromDiscord<nervecenter> Quite frankly the monolithic web server is probably a bad idea because on the upstream end, it forces languages to implement vast library stacks to even be viable, and on the downstream end, makes companies totally reliant on those stacks with little hope for upgrading if it becomes necessary.
20:36:47FromDiscord<uninnocent> Any api for refreshing file explorer / desktop
20:36:53FromDiscord<uninnocent> same thing as right clicking > refresh
20:37:03FromDiscord<uninnocent> I cant find one
20:41:13FromDiscord<Elegantbeef> Probably inside winim since it's the only OS that has that
20:41:48FromDiscord<Elegantbeef> Or you need to use the com api to send an event
20:42:04FromDiscord<uninnocent> sent a code paste, see https://paste.rs/q8wUo
20:42:09FromDiscord<uninnocent> (edit)
20:42:14FromDiscord<uninnocent> C:\Users\Jennifer\Desktop\Argon\experiment.nim(6, 30) Error: ambiguous call; both system.and(x: bool, y: bool) [proc declared in C:\Users\Jennifer\.choosenim\toolchains\nim-1.6.12\lib\system\basic_types.nim(48, 6)] and system.and(x: int32, y: int32) [proc declared in C:\Users\Jennifer\.choosenim\toolchains\nim-1.6.12\lib\system\arithmetics.nim(299, 6)] match for: (WINBOOL, bool)
20:42:23FromDiscord<uninnocent> Weird error, im not sure how to fix it
20:43:28FromDiscord<Elegantbeef> Convert your types to bools
20:43:37FromDiscord<Elegantbeef> The windows API doesnt return bools probably
20:44:29FromDiscord<uninnocent> sent a code paste, see https://play.nim-lang.org/#ix=4Bp8
20:45:32FromDiscord<Elegantbeef> You don't need to import system btw
20:45:33FromDiscord<Elegantbeef> But yea no clue I dont use windows
20:47:06FromDiscord<uninnocent> fixed it nvm
20:48:53FromDiscord<takemichihanagaki3129> In reply to @jviega "I was okay w/": What is wrong with these two language? (just curiosity)
20:49:57FromDiscord<uninnocent> Go executables are huge, python is slow, and c projects are difficult to manage because of their length im assuming
20:51:45FromDiscord<takemichihanagaki3129> In reply to @uninnocent "Go executables are huge,": Yeah, I agree with all those points.
20:53:39FromDiscord<takemichihanagaki3129> In reply to @uninnocent "Go executables are huge,": 1.9mb for a single "hello world"... If I'm not wrong.
20:53:45FromDiscord<uninnocent> Yeah, something like that
20:53:53FromDiscord<uninnocent> Python isnt much better
20:55:51FromDiscord<takemichihanagaki3129> In reply to @uninnocent "Python isnt much better": Yes!
20:58:00FromDiscord<takemichihanagaki3129> https://users.rust-lang.org/t/rust-hello-world-binary-file-size-is-huge/53620↵@uninnocent look at that, Rust with more than 3mb...↵He optimized the compilation, and it went to more than 1mb... LOL
20:58:23FromDiscord<takemichihanagaki3129> That's a thing that I like in Nim, small footprint.
20:58:32FromDiscord<konsumlamm> In reply to @_gumbercules "Hell, even some PLs": i'm curious, have you ever tried D? if so, how does the developer experience compare?
20:58:34FromDiscord<uninnocent> Yeah, but the benifit of rust is that you can run it in or with literally anything
20:58:45FromDiscord<uninnocent> same with c
20:58:59FromDiscord<takemichihanagaki3129> In reply to @uninnocent "Yeah, but the benifit": Yes, for sure!
21:00:44*jmdaemon joined #nim
21:03:17FromDiscord<uninnocent> sent a code paste, see https://play.nim-lang.org/#ix=4Bpg
21:03:23FromDiscord<uninnocent> Sometimes it's Desktop, sometimes it's Documents, etc
21:04:08FromDiscord<uninnocent> sent a code paste, see https://play.nim-lang.org/#ix=4Bph
21:14:29FromDiscord<uninnocent> How would I get the process ids and the executable they're running from using winim?
21:14:37FromDiscord<jviega> C is not memory safe (and certainly not type safe), and thus hard to write robust programs. Rust is write-only, too hard to read other people's code. And noone should have to work harder on memory management than if they were writing C
21:22:52FromDiscord<takemichihanagaki3129> In reply to @jviega "C is not memory": Makes all sense to me. Yes, definitely C is not type-safe as people think...↵In C, we have the preprocessor, castings and `void`, arrays can give you segfaults easily and I prefer write it by hand as a structure with some simple functions...
21:24:13FromDiscord<takemichihanagaki3129> In reply to @jviega "C is not memory": I've never tried to read someone else's rust code, I'll try to see it.↵But I totally see your point.↵↵I have heard about `async` being extremely hard to read after some months too...
21:53:38*pbsds joined #nim
22:24:36*xet7 quit (Ping timeout: 245 seconds)
22:38:21FromDiscord<_gumbercules> In reply to @konsumlamm "i'm curious, have you": I tried D out for a very brief period when I was first looking into Nim. I can't really comment because I imagine D has changed a lot since then. I know D, similar to Nim has failed to achieve the mainstream success of other more recent arrivals in the system programming language space.
22:38:59FromDiscord<_gumbercules> In reply to @uninnocent "Yeah, but the benifit": I don't think you can run Rust in or with anything. It requires LLVM as a dependency which is quite heavy.
22:39:21FromDiscord<Elegantbeef> Well it uses LLVM and you can cross compile it to many places
22:39:25FromDiscord<_gumbercules> Sure
22:39:44FromDiscord<Elegantbeef> Though andrew kelley points out those targets exist but it does not work as well one wants
22:39:48FromDiscord<_gumbercules> But one can say that about any LLVM language - Rust isn't special in this regard
22:40:05FromDiscord<Elegantbeef> Right, it's a pointless distinction
23:43:47FromDiscord<jviega> Who thinks C is type safe??!!!
23:43:57FromDiscord<jviega> 🤣