<< 01-08-2022 >>

00:15:51FromDiscord<!Patitotective> sent a long message, see http://ix.io/46in
00:32:24FromDiscord<#!/rip/luke> sent a code paste, see https://play.nim-lang.org/#ix=46io
00:32:54FromDiscord<Prestige> Yeah it'll return the url
00:33:07FromDiscord<#!/rip/luke> ok
00:35:08FromDiscord<Prestige> I have a more useful script if you'd like, that I use for screenshots
00:35:28FromDiscord<Prestige> maybe I'll put it in #offtopic
00:41:02FromDiscord<neon_> i still haven't gotten it to compile nativesockets T.T
00:45:23*wallabra_ joined #nim
00:46:45*wallabra quit (Ping timeout: 276 seconds)
00:47:18*wallabra_ is now known as wallabra
00:53:10FromDiscord<neon_> I dont know where or how but nim generates a c file for nativesockets and it has a conflicting definition that i have no clue how to fix
00:53:14FromDiscord<Tuatarian> If I have a variable length array that I need only to find the minimum element of
00:53:33FromDiscord<Tuatarian> It is more efficient to go through a seq than to use a min heap right?
00:54:23FromDiscord<Tuatarian> I take the min element quite a bit less often than I push to the array
00:54:36FromDiscord<Tuatarian> So the heapification would be way more expensive, right?
00:54:41FromDiscord<Elegantbeef> Probably since the elements are stored contiguously
00:54:46FromDiscord<Tuatarian> (djikstra Algo)
00:55:09FromDiscord<Tuatarian> In reply to @Elegantbeef "Probably since the elements": Meaning?
00:55:17FromDiscord<Elegantbeef> It's more cache friendly
00:55:25FromDiscord<Tuatarian> Wdym contiguously
00:55:46FromDiscord<Elegantbeef> A binary tree generally uses references so the data is stored all over the heap, a seq can store value types next to eachother tightly
00:56:02FromDiscord<Tuatarian> Oh I see
00:56:02FromDiscord<Elegantbeef> How are you compiling?↵(@neon_)
00:56:18FromDiscord<Tuatarian> Would that make accesses more efficient then?
00:56:23FromDiscord<Elegantbeef> Yes
00:56:31FromDiscord<Tuatarian> Since you only need to ask for one spot in memory
00:56:33FromDiscord<Tuatarian> Makes sense
00:56:34FromDiscord<Tuatarian> Thanks
00:56:52FromDiscord<Elegantbeef> Well you also have a cache line which is generally 64-128 bytes
00:57:04FromDiscord<Elegantbeef> So when you get 1 element in a seq you get more than just that element generally
00:57:24FromDiscord<neon_> sent a code paste, see https://play.nim-lang.org/#ix=46iq
00:58:55FromDiscord<neon_> basically im doing dynlibOverride since from as far as i understood it it'll integrate the dll's required into the executable without me having to include them externaly on the filesystem
00:59:06FromDiscord<Elegantbeef> that's not what that does
00:59:15FromDiscord<neon_> what does it do then
00:59:44FromDiscord<Elegantbeef> It stops the dynamic linking for all modules, you need to then provide them with a static version of the library
01:00:56FromDiscord<Elegantbeef> https://nim-lang.org/docs/nimc.html#dynliboverride
01:01:08FromDiscord<neon_> sent a code paste, see https://play.nim-lang.org/#ix=
01:01:31FromDiscord<Elegantbeef> You will not when you use dynliboverride and provide it with the static library for all your dlls
01:01:45FromDiscord<Elegantbeef> But you have to statically link all of them manually
01:01:50FromDiscord<neon_> its not failing because of the library
01:02:03FromDiscord<Elegantbeef> I know i'm just saying that's wrong
01:02:25FromDiscord<Elegantbeef> Is there anyway i can get the code?
01:02:37FromDiscord<neon_> well i added --dynlibOverride:opus and it didnt link
01:02:56FromDiscord<neon_> like it still required the dll to be present
01:03:07FromDiscord<neon_> but it compiled without the windows socket error
01:04:05FromDiscord<neon_> In reply to @Elegantbeef "But you have to": ok so just so i understand it; it does what i want but i have to provide the libraries myself correct? as in it packages them into the exe itself
01:04:32FromDiscord<Elegantbeef> You have to have the `.lib` or `.a` files(dont recall which windows uses) and pass them to the linker
01:06:01FromDiscord<neon_> sent a code paste, see https://play.nim-lang.org/#ix=
01:18:49FromDiscord<ajusa> Has anyone here worked with npeg? I'm trying to match the string values of an enum, but even after converting the enum values to a set it doesn't let me use it as a constant...
01:19:28FromDiscord<Elegantbeef> Might it need to be an array of strings instead?
01:20:59FromDiscord<Elegantbeef> Hasnt @!Patitotective used npeg?
01:21:07FromDiscord<ajusa> I don't think it does? Not sure
01:24:18FromDiscord<!Patitotective> In reply to @Elegantbeef "Hasnt <@762008715162419261> used npeg?": yea
01:25:22FromDiscord<ajusa> sent a code paste, see https://play.nim-lang.org/#ix=46iv
01:29:30FromDiscord<!Patitotective> i dont think you can, you have to repeat them in the npeg rule
01:29:43FromDiscord<!Patitotective> since npeg has its own syntax it doesnt allow external variables
01:29:51FromDiscord<!Patitotective> (edit) "since npeg has its own syntax ... it" added "(macro)"
01:31:35FromDiscord<ajusa> Oh. I think I'll just have it match any character, and then count on the parseEnum to throw an error
01:32:31FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=46iz
01:32:38FromDiscord<!Patitotective> (edit) "https://play.nim-lang.org/#ix=46iz" => "https://play.nim-lang.org/#ix=46iA"
01:33:38FromDiscord<ajusa> Thanks for the example!
01:33:59FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=46iB
01:34:17FromDiscord<!Patitotective> 🌃
02:10:36FromDiscord<Tuatarian> anyone have any idea why djikstra's algorithm might be running super slowly?
02:11:27FromDiscord<Tuatarian> this is my code
02:11:29FromDiscord<Tuatarian> sent a code paste, see https://play.nim-lang.org/#ix=46iI
02:11:31FromDiscord<Tuatarian> it seems fairly standard
02:11:37FromDiscord<Tuatarian> not sure what I'm doing super wrong here
02:13:38FromDiscord<Prestige> How slow is it?
02:21:51FromDiscord<voidwalker> any http client that allows getting a byte range or stop after getting N bytes ?
02:23:13FromDiscord<huantian> I'm not sure, we do really need a nice streaming api for httpclient tho
02:23:47FromDiscord<huantian> is bodyStream for the synchronous version of httpclient streaming?
02:28:13FromDiscord<voidwalker> yeah looks like it's for both. I searched the wrong words in the page
02:40:29FromDiscord<flywind> Should this compile?
02:40:42FromDiscord<flywind> sent a code paste, see https://play.nim-lang.org/#ix=46iT
02:41:02FromDiscord<Rika> Probably not
02:41:17FromDiscord<flywind> I think so, this is broken.
02:42:20FromDiscord<voidwalker> but wait, if the http client body is read synchronously, then it must block until it has finished/errored
02:42:40FromDiscord<voidwalker> so the bodyStream must be available only after it has already finished downloading
02:42:57FromDiscord<Prestige> `implicit initialization can also be prevented by the requiresInit type pragma. The compiler requires an explicit initialization for the object and all of its fields.` @flywind
02:43:38FromDiscord<Prestige> Under this section: https://nim-lang.org/docs/manual.html#statements-and-expressions-var-statement
02:43:56FromDiscord<flywind> I see
02:44:41FromDiscord<flywind> sent a code paste, see https://play.nim-lang.org/#ix=46iU
02:44:45FromDiscord<flywind> (edit)
02:44:58FromDiscord<flywind> `Cannot prove that 'result' is initialized. This will become a compile time error in the future. [ProveInit]`
02:45:27FromDiscord<Prestige> Ah, yeah
02:45:36FromDiscord<Prestige> I thought it would already by an error
02:45:54FromDiscord<theangryepicbanana> curious, is there a reason why nim outputs `(foo).bar` in C output instead of `foo->bar`?
02:48:17*arkurious quit (Quit: Leaving)
04:50:37FromDiscord<Tuatarian> is there a faster way than hashtables to implement djikstra's algorithm?
04:50:43FromDiscord<Tuatarian> hashtables in general seem to be slow
04:50:57FromDiscord<Tuatarian> but i can't think of any non terrible way to do it without them
04:51:10FromDiscord<huantian> Isn't the traditional way with a heap queue?
04:51:37FromDiscord<Tuatarian> yes for the nodes currently being considered
04:52:02FromDiscord<Tuatarian> but for example the way you store where you came from is a hashtable, and the way you associate costs to tiles is a hashtable
04:57:08*rockcavera quit (Remote host closed the connection)
05:07:02*termer quit (Quit: ZNC 1.7.5+deb4 - https://znc.in)
05:37:06FromDiscord<babusri> Trying out nim for the first time. I install inim on mac and ran↵sha256.digest("hello nim")↵↵It takes 5 seconds every time. What is the reason for this?
05:37:36FromDiscord<Elegantbeef> Inim recompiles the program each change
05:41:12FromDiscord<babusri> Is there a solution for this? Like I said, I am new to nim.↵python -i gives the result immediately the first time and every time.
05:42:11FromDiscord<Rika> Write the file and compile with Nim
05:42:29FromDiscord<Elegantbeef> Yea writing the code in a file is the best way if inim isnt making you happy
05:42:40FromDiscord<Elegantbeef> Nim being statically typed and compiled means it takes time to get runnable code
05:43:58FromDiscord<Prestige> `nim c foo.nim` then `./foo` to run
05:44:10FromDiscord<Elegantbeef> Or just `nim c -r ./foo.nim` if you're cool
05:44:17FromDiscord<Prestige> neat
05:44:21FromDiscord<Elegantbeef> Or `nim r ./foo.nim` if you dont want to look at the binary
05:46:56FromDiscord<Phil> In reply to @babusri "Is there a solution": I have a "playground" project for exactly this purpose
05:47:06FromDiscord<Rika> I have a scratches folder
05:47:15FromDiscord<Elegantbeef> Everyone has a playground project it's `/tmp/` on \nix 😄
05:47:41FromDiscord<babusri> It is not a question of making me happy. A repl is convenient to run some quick commands (like a calculator). Say you downloaded a executable and you want to check its hash.↵5 seconds on mac seems a long time. ↵Anyway, thanks for your answers.
05:47:43FromDiscord<Phil> I want my playground stuff to stick around though since I often take another look at it later again
05:48:11FromDiscord<Phil> (that was directed at beef)
05:48:44FromDiscord<Phil> In reply to @babusri "It is not a": For simple stuff you may also look into Nim secret
05:49:12FromDiscord<Prestige> In reply to @babusri "It is not a": Well Macs _do_ suck at being fast
05:49:21FromDiscord<Rika> In reply to @Avahe "Well Macs _do_ suck": Depends on the Max
05:49:22FromDiscord<babusri> In reply to @Isofruit "I have a "playground"": Ok
05:49:22FromDiscord<Elegantbeef> Hey M1 and M2s are pretty fast
05:49:23FromDiscord<Rika> Mac
05:49:38FromDiscord<Prestige> The hardware is fast
05:49:45FromDiscord<Phil> It doesn't allow you to use the entire std lib but it basically runs on the compiler VM that it uses to compile your code. Or something like that, I'm not insanely deep into the technicalities
05:50:03FromDiscord<Elegantbeef> It uses the VM that's used for compile time evaluation and macro expansion
05:50:10FromDiscord<Rika> In reply to @Avahe "The hardware is fast": What does that even mean? Were you not talking about the hardware
05:50:32FromDiscord<Prestige> Beef was
05:50:49FromDiscord<babusri> btw, regarding nim being a statically typed language, I remember running a repl with haskell (another statically typed language) and running commands and it was very fast.↵So, I am not sure statically typed is the culprit here.
05:51:01FromDiscord<Rika> Yes but how would the hardware being fast allow for the thing not being fast, I sure doubt macOS is slow
05:51:16FromDiscord<Prestige> It is slow
05:51:32FromDiscord<Elegantbeef> Prestige you're making me lose IQ points here
05:51:39FromDiscord<Tuatarian> guys are hashtables slow?
05:51:46FromDiscord<Rika> In reply to @iWonderAboutTuatara "guys are hashtables slow?": Slower than?
05:51:49FromDiscord<Elegantbeef> Compared to what
05:51:54FromDiscord<Tuatarian> not sure what the alternative is
05:52:10FromDiscord<Tuatarian> I need to run djikstra each position of my game
05:52:11FromDiscord<Prestige> Linux desktops
05:52:12FromDiscord<Rika> Well it’s hard to say because you usually say something is slow because something else is fast
05:52:31FromDiscord<Tuatarian> is there a faster way to do many of the djikstra things than hashtable
05:53:03FromDiscord<Tuatarian> since for example storing where each cell came from typically uses hashtable, storing cost till a cell typically uses hashtable, etc
05:53:17FromDiscord<Tuatarian> but i seem to be losing time to the `isFilled` (or something like that) function
05:53:22FromDiscord<Tuatarian> which appears in a lot of the table ops
05:53:23FromDiscord<Rika> Someone mentioned that Dijkstra is usually implemented with a heap queue
05:53:28FromDiscord<Tuatarian> even access and setting
05:53:29FromDiscord<babusri> Lots of statically typed languages (go, rust) don't have repls and that is perfectly fine, but when some do, there is an expectation of good response.
05:53:46FromDiscord<Tuatarian> right, but the heapqueue is used as a priority queue
05:53:52FromDiscord<Phil> In reply to @babusri "It is not a": I'm somewhat surprised as the hardware I'm using works in under 1 sec, though that's x86
05:53:52FromDiscord<Tuatarian> not the same purpose as the hashtables
05:53:55FromDiscord<Rika> In reply to @babusri "Lots of statically typed": Then feel free to treat the REPL here as nonexistent 😛
05:54:13FromDiscord<Tuatarian> and rather than using a heap, I think it makes more sense to just use a seq and find the smallest element each time
05:54:15FromDiscord<Phil> Is the same speed true for Nim secret?
05:54:23FromDiscord<Tuatarian> since it should be cheaper than recomputing the heap each time you push onto it
05:54:34FromDiscord<Tuatarian> though i am not sure about that
05:54:43FromDiscord<Elegantbeef> Nim secret is faster as it just has the Nim compiler + interpreter
05:54:46FromDiscord<Tuatarian> plus, I think access should be faster
05:54:51FromDiscord<Elegantbeef> It doesnt output C code to then get compiled by the C compiler
05:55:10FromDiscord<Phil> Was directed at babusri to test it out and report performance
05:55:10FromDiscord<Rika> In reply to @iWonderAboutTuatara "but i seem to": How’d you benchmark?
05:55:15FromDiscord<Tuatarian> nimprof
05:55:22FromDiscord<Elegantbeef> In a release build?
05:55:25FromDiscord<Tuatarian> debug
05:55:32FromDiscord<Elegantbeef> you dont benchmark debug builds
05:56:01FromDiscord<Rika> Personally I don’t use that because it shows call counts and not CPU time
05:56:01FromDiscord<Tuatarian> yeah I realized that I should have thought a little bit more once you asked if it was a release build lmao
05:56:10FromDiscord<Rika> Something called often doesn’t necessarily mean it’s the blocker
05:56:12FromDiscord<Tuatarian> agree, but not sure what else to use instead
05:56:14FromDiscord<Elegantbeef> you want that optimiser on before you attempt to reason performance of anything
05:56:24FromDiscord<Elegantbeef> valgrind, perf, vtune, literally any profiler
05:56:37FromDiscord<Prestige> I love valgrind
05:56:37FromDiscord<Rika> Doesn’t treeform also have profiler libraries
05:56:47FromDiscord<Prestige> Yes
05:56:59FromDiscord<Rika> The motherfucker has everything lmao
05:57:14FromDiscord<Rika> Definition of 10x programmer: treeform
05:57:25FromDiscord<Prestige> For real
05:57:27FromDiscord<babusri> In reply to @Isofruit "Was directed at babusri": I did not understand. What do you want me to try?
05:57:31FromDiscord<huantian> honestly tho
05:57:31FromDiscord<Tuatarian> treeform is absolutely insane
05:57:37FromDiscord<Tuatarian> the guy has a library for everything
05:57:40FromDiscord<Tuatarian> no idea how they manage it
05:58:09FromDiscord<Prestige> I wonder if he doesn't work or if he just does all of that in his free time
05:58:21FromDiscord<Tuatarian> ok release build is a million times faster
05:58:24FromDiscord<Elegantbeef> This is for his job afaict
05:58:26FromDiscord<huantian> we still need yamly and tomly 😛
05:58:35FromDiscord<Elegantbeef> No just use frosty huan
05:58:40FromDiscord<Prestige> In reply to @Elegantbeef "This is for his": Oh, that explains a lot
05:59:01FromDiscord<Elegantbeef> Frosty literally solves the serialiser problem for every format
05:59:10FromDiscord<Elegantbeef> But no one uses!
05:59:26FromDiscord<huantian> yeah frosty is pretty awesome
05:59:48FromDiscord<Prestige> https://github.com/treeform/benchy
05:59:55FromDiscord<huantian> also the current dominant nim yaml uses nix flakes which is quite based
06:00:10FromDiscord<Tuatarian> In reply to @Elegantbeef "This is for his": that would make sense
06:00:13FromDiscord<Elegantbeef> Frosty is the serde of Nim, so it's a shame no one really uses it
06:00:25FromDiscord<Tuatarian> I personally hate his naming format lmao
06:00:34FromDiscord<Tuatarian> everything ending in y, for some reason I don't like it
06:00:42FromDiscord<Elegantbeef> Y?↵(@Tuatarian)
06:00:47FromDiscord<Prestige> At least his name isn't treeformy
06:00:50FromDiscord<huantian> is disruptek still active?
06:00:51FromDiscord<Tuatarian> puppy, flippy, frosty, etc etc
06:01:00FromDiscord<Tuatarian> In reply to @Avahe "At least his name": lmao
06:01:02FromDiscord<Elegantbeef> I was making aj oke
06:01:10FromDiscord<Tuatarian> oh lol, went over my head
06:01:10FromDiscord<Phil> In reply to @babusri "I did not understand.": To start up Nim secret, which supports a subset of nim syntax and can act as a repl and see whether it performs better
06:01:11FromDiscord<huantian> i'd say he's treeform level, balls and nimph are quite awesome
06:01:12FromDiscord<Prestige> In reply to @huantian "is disruptek still active?": Yes but not in this chat, he's been banned
06:01:14FromDiscord<Elegantbeef> He doesnt write Nim but he's still alive in his banland↵(@huantian)
06:01:21FromDiscord<Tuatarian> what does he do now?
06:01:27FromDiscord<Tuatarian> he's not banned from forums right, just irc?
06:01:31FromDiscord<Elegantbeef> Makes a shitload of money
06:01:39FromDiscord<Tuatarian> where does he work?
06:01:48FromDiscord<Tuatarian> / what does he do
06:01:49FromDiscord<Elegantbeef> I'm not going to say anymore
06:01:50FromDiscord<Prestige> Also this: https://github.com/treeform/hottie
06:01:56FromDiscord<Tuatarian> fair
06:01:57FromDiscord<Prestige> For profiling code
06:02:08FromDiscord<Elegantbeef> Hey that has my name on it
06:05:43FromDiscord<huantian> man nim drama is so juicy
06:06:25FromDiscord<babusri> In reply to @Isofruit "To start up Nim": With nim secret I get the hash value instantaneously.
06:38:28*Guest2776 quit (*.net *.split)
06:38:28*robertmeta quit (*.net *.split)
06:38:28*oz quit (*.net *.split)
06:38:29*euantorano quit (*.net *.split)
06:38:29*DixieFlatline quit (*.net *.split)
06:38:29*madprops quit (*.net *.split)
06:38:29*meowray quit (*.net *.split)
06:38:36*Guest2776 joined #nim
06:38:37*meowray joined #nim
06:38:39*madprops joined #nim
06:38:43*robertmeta joined #nim
06:38:44*DixieFlatline joined #nim
06:38:46*euantorano joined #nim
06:39:11*madprops quit (Changing host)
06:39:11*madprops joined #nim
06:39:31*ox joined #nim
06:42:27FromDiscord<Aster> How is nim when used for reverse engineering? Not hacking but reversing file archives, decompression, etc.
06:45:55*gsalazar joined #nim
06:51:09*NimBot joined #nim
06:51:31*nisstyre joined #nim
06:51:42*xaltsc joined #nim
06:51:56*xaltsc quit (Changing host)
06:51:56*xaltsc joined #nim
06:51:59*ormiret joined #nim
06:57:39*gsalazar quit (Read error: Connection reset by peer)
06:57:41*gsalazar_ joined #nim
07:16:45*gsalazar_ quit (Quit: Leaving)
07:17:03*gsalazar joined #nim
07:46:12FromDiscord<Phil> In reply to @Aster "How is nim when": I can't really be of help there... do we have folks that do reverse engineering?
07:46:49FromDiscord<Aster> Decompression and byte extraction pretty much. Anything in assembly I can do outside Nim.
07:47:21FromDiscord<Yardanico> In reply to @Aster "How is nim when": not different from other languages :)
07:47:29FromDiscord<Yardanico> there are some libraries that help with (de)serialization as well
07:47:43FromDiscord<Phil> In reply to @babusri "With nim secret I": Nice! Does the slightly limited capability of that repl fulfill the role you'd want it to?
07:50:25FromDiscord<Aster> In reply to @Yardanico "not different from other": Thank you my friend. This is excellent news. I have been using C# but I wanted to learn Nim. It is such a beautiful language to read.
07:50:42FromDiscord<Aster> Way better than R for sure.
08:07:57*gsalazar quit (Ping timeout: 245 seconds)
08:08:44*gsalazar joined #nim
08:39:31*mfx joined #nim
08:39:56FromDiscord<babusri> In reply to @Isofruit "Nice! Does the slightly": Yes.
08:40:39*mfx quit (Client Quit)
08:48:10FromDiscord<Phil> That leads me to a different question that I'm kinda curious what could cause such slowness in inim on mac
08:49:21FromDiscord<flywind> In reply to @Isofruit "That leads me to": inim is basically using the Nim compiler to compile everything.
08:49:37FromDiscord<flywind> It is not a real repl.
08:51:18FromDiscord<j-james> is `nim secret` nimscript?
08:51:23FromDiscord<Elegantbeef> Yes
08:56:41FromDiscord<j-james> damn inim's pretty good for compiling everything then
08:57:13FromDiscord<Yardanico> In reply to @j-james "damn inim's pretty good": i mean, that's thanks to Nim itself not being too slow for compiling small things :)
08:57:57FromDiscord<Yardanico> when you start inim, it makes a temporary file, and then appends each line you add and recompiles + re-runs the whole file, and strips output that's been output'd in previous lines already
08:59:16FromDiscord<Yardanico> you can generally make inim even faster with tcc
09:07:43FromDiscord<Phil> In reply to @flywind "inim is basically using": That I understand, however I do not get how a simple command appears to take so long on Mac to execute, is the compiler on Mac just especially slow?
09:10:09FromDiscord<flywind> Don't a have a mac, how slow?
09:11:17FromDiscord<flywind> Somethimes I need to use a debug compiler to compile the Nim compiler, which spends 3 minutes 🙁
09:11:32FromDiscord<Yardanico> huh?
09:11:41FromDiscord<Yardanico> ah, got it
09:11:45FromDiscord<Phil> Me neither, babusri mentioned it taking upwards of seconds to check the hash of an executable around 7:47 today, that's my point of reference
09:27:02*gsalazar quit (Read error: Connection reset by peer)
09:27:20*gsalazar joined #nim
09:35:32*bitgestalt joined #nim
09:35:38*pch joined #nim
09:46:39*bitgestalt quit (Quit: Leaving)
10:00:14*wallabra_ joined #nim
10:00:52*wallabra quit (Ping timeout: 245 seconds)
10:01:43*wallabra_ is now known as wallabra
10:23:17*xet7 quit (Quit: Leaving)
10:34:17FromDiscord<4zv4l> can I create an array without giving the length but the array is written in the code so the size won't change ?
10:34:27FromDiscord<4zv4l> just it's long and I don't wanna count oh much element there is inside
10:35:15FromDiscord<Yardanico> In reply to @4zv4l "can I create an": of course, you can do that for every type, not just arrays
10:35:18FromDiscord<4zv4l> (edit) "oh" => "how"
10:35:18*gsalazar quit (Quit: Leaving)
10:35:20FromDiscord<Yardanico> `let a = [1, 2, 3, 4, 5]`
10:35:25FromDiscord<4zv4l> oh perfect !
10:35:34*gsalazar joined #nim
10:35:42FromDiscord<Yardanico> specifying types for variables when you initialize them right away is optional
10:35:51*Wabby joined #nim
10:35:53FromDiscord<Yardanico> it's only needed if you initialize them later, so the compiler doesn't know the type
10:36:49FromDiscord<4zv4l> alright, thank you very much
10:36:56FromDiscord<4zv4l> I also got another question
10:37:15FromDiscord<4zv4l> if I import a library does the compiler will optimize and only import the functions I use or not ?
10:39:16FromDiscord<Yardanico> In reply to @4zv4l "if I import a": yes, Nim always does dead code elimination
10:39:22*Wabby quit (Client Quit)
10:39:39FromDiscord<Yardanico> the stuff that's left in binary is only code/functions/etc that are actually used by your code (unless you specifically use things like `exportc` to keep them)
10:40:41FromDiscord<4zv4l> and if I import libraries that use the same name for functions↵I can precise them with for example terminal.doThis and anotherlib.doThis ?
10:40:49FromDiscord<Yardanico> yes
10:40:58FromDiscord<4zv4l> (edit) "terminal.doThis" => "`terminal.doThis`" | "anotherlib.doThis" => "`anotherlib.doThis`"
10:41:00FromDiscord<4zv4l> amazing
10:41:03FromDiscord<Yardanico> but that is only required if those functions have exactly the same signature (number of arguments)
10:41:16FromDiscord<Yardanico> and even then you can overload by argument names if you specify them in the call
10:41:23FromDiscord<Yardanico> In reply to @Yardanico "but that is only": and type of arguments as well of course
10:42:15FromDiscord<Yardanico> so if you have `proc doThis(x: int, y: string)` in `terminal` and `proc doThis(x: string, y: int)` in `anotherlib`, then you can call them from both libs as `doThis` without specifying the module, since their signatures are different
10:42:47FromDiscord<Yardanico> nim stdlib only has a couple cases where different modules' procs have the same signature
10:50:54FromDiscord<4zv4l> yeaaah, actually I learnt overloading with Nim
10:51:11FromDiscord<4zv4l> just I use `sample` to get a random word from an array of string and it always return the same one
10:51:20FromDiscord<4zv4l> is that normal ? Do I need to give a seed to the randomizer ?
10:52:24FromDiscord<4zv4l> of yeah with `randomize()`
10:52:26FromDiscord<Rika> You need to call "randomize()" at thebstart
10:53:40FromDiscord<4zv4l> thanks ^^
11:00:52FromDiscord<LaughingBubba> Hi does anyone know how long it takes to get a confirmation email for a new forums account?
11:01:16FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=46kZ
11:07:45FromDiscord<domosokrat> @4zv4l\: default is to only document exported symbols.
11:08:12FromDiscord<4zv4l> how do I change that ?
11:08:33FromDiscord<4zv4l> I don't find how to change that in the doc
11:08:47FromDiscord<domosokrat> Add `--docInternal` to your `nim doc` call
11:09:52FromDiscord<4zv4l> where is that written to do that ?
11:10:49FromDiscord<LaughingBubba> In the config.nims I think
11:11:44FromDiscord<4zv4l> also how do I do a newline ? `\` ` ` didn't work
11:11:52FromDiscord<4zv4l> In reply to @LaughingBubba "In the config.nims I": I mean that should be written in the doc
11:12:04FromDiscord<domosokrat> nim --fullhelp shows that option
11:15:03*termer joined #nim
11:20:16FromDiscord<domosokrat> Try a Lineblock\: https://docutils.sourceforge.io/docs/user/rst/quickref.html#line-blocks↵(@4zv4l)
11:22:43FromDiscord<4zv4l> In reply to @domosokrat "nim --fullhelp shows that": alright thanks !
11:22:54FromDiscord<4zv4l> In reply to @domosokrat "Try a Lineblock\: https://docutils.sourceforge.io/d": I did a blank like with ## and it worked
11:27:41FromDiscord<4zv4l> is it possible to export the doc to a README.md ?
11:34:08*om3ga quit (Ping timeout: 255 seconds)
11:35:33*wallabra_ joined #nim
11:37:11*wallabra quit (Ping timeout: 244 seconds)
11:39:02*wallabra joined #nim
11:41:51*wallabra_ quit (Ping timeout: 268 seconds)
11:50:04*wallabra_ joined #nim
11:51:21FromDiscord<hotdog> In reply to @4zv4l "is it possible to": Have a look at https://nimble.directory/pkg/mddoc
11:52:32*wallabra quit (Ping timeout: 255 seconds)
11:54:25*jmdaemon quit (Ping timeout: 272 seconds)
11:54:29*wallabra joined #nim
11:56:14*wallabra_ quit (Ping timeout: 240 seconds)
12:01:56FromDiscord<Phil> In reply to @LaughingBubba "Hi does anyone know": <@&371760044473319454> potential email problems
12:02:41FromDiscord<Yardanico> yes but where's the username :/
12:02:49FromDiscord<Yardanico> In reply to @LaughingBubba "Hi does anyone know": What's your username on the forum?
12:02:58FromDiscord<Yardanico> If you didn't get the email right away, it probably won't come at all
12:03:04FromDiscord<LaughingBubba> Same as discord
12:03:41FromDiscord<Yardanico> approved
12:29:29FromDiscord<LaughingBubba> Ok thanks!! @Yardanico
12:35:27NimEventerNew thread by LaughingBubba: Text portion of an XmlNode type, see https://forum.nim-lang.org/t/9335
12:35:46*wallabra_ joined #nim
12:37:50*wallabra quit (Ping timeout: 240 seconds)
12:37:51*wallabra_ is now known as wallabra
12:48:58FromDiscord<Phil> sent a code paste, see https://paste.rs/SLq
12:49:27FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=46lv" => "https://play.nim-lang.org/#ix=46lu"
12:50:54FromDiscord<Phil> the field names are not all that straight forward, because object of an object variants have fields that exist or do not exist depending on the value of a "kind" field!↵That's how you manage to be somewhat dynamic in nim, allowing e.g. parsing from Json into an intermediate state where you represent something as JsonNode, even though it could contain a string, an int, an array, a bool, an object or something else
12:51:13FromDiscord<Phil> (edit) "JsonNode," => "a statically typed JsonNode object,"
12:52:00*pch_ joined #nim
12:52:11*pch_ quit (Client Quit)
12:52:22FromDiscord<Phil> I'm actually not familiar with if that concept exists in other languages
12:54:36*gsalazar quit (Remote host closed the connection)
12:54:46*gsalazar joined #nim
12:56:41FromDiscord<Rika> Discriminated unions is what they’re more commonly called
12:57:08FromDiscord<Rika> Tagged union I guess
12:57:13FromDiscord<Phil> Alternatively "tagged union"?
12:57:15FromDiscord<Phil> Ah, check
12:57:31FromDiscord<Phil> In that case nevermind, java does have tagged union
12:57:38FromDiscord<Phil> Though I have never ever ever ever seen them being used
12:59:02FromDiscord<Rika> Probably because enterprise lag
12:59:57FromDiscord<Phil> I'd wager it's more likely that the usecase is abstracted away behind 50 abstraction layers so some sort of package (e.g. jackson) takes care of it for you
13:00:16FromDiscord<Phil> java things
13:00:24FromDiscord<Phil> (edit)
13:07:18FromDiscord<4zv4l> In reply to @hotdog "Have a look at": I don't succeed to use it
13:07:25FromDiscord<4zv4l> there is no real help on the github page
13:07:43FromDiscord<4zv4l> like it asks for a README but I want to generate it↵and it asks for a doc.json but there isn't in my project
13:08:00FromDiscord<4zv4l> and when I run `mddoc -h` it shows the `nim` help not the mddoc help
13:12:19*wallabra_ joined #nim
13:14:14*wallabra quit (Ping timeout: 240 seconds)
13:14:15*wallabra_ is now known as wallabra
13:36:40FromDiscord<LaughingBubba> @Phil thanks will look into it but seems overly tricky to just access the text node. I’m not a fan of parsing into a dom but it should quick and easy … I think I’ll go for the SAX type of parsing next
13:39:46*arkurious joined #nim
13:48:04FromDiscord<Phil> In reply to @LaughingBubba "<@180601887916163073> thanks will": For ease of use you have convenience procs such as text() and the like, which tries to shield you from that complexity. Combined with the answers you got in the forum I mostly wanted to give you a basis for understanding what language feature you're dealing with there
13:52:06*ggsx joined #nim
13:53:19FromDiscord<hotdog> In reply to @4zv4l "like it asks for": Just make an empty README file and it should append to it
13:53:29FromDiscord<hotdog> You don't need any doc.json
13:53:29FromDiscord<LaughingBubba> @Phil thing is text() doesn’t work hence the forum post.
13:53:39NimEventerNew thread by Juancarlospaco: Nim Wiki disabled contributions, see https://forum.nim-lang.org/t/9336
13:53:53FromDiscord<4zv4l> In reply to @hotdog "Just make an empty": I did but then the readme contains almost nothing
13:54:06FromDiscord<Rika> In reply to @LaughingBubba "<@180601887916163073> thing is text()": Someone replied that the alternative works "innerText"
13:54:07FromDiscord<LaughingBubba> (edit) "@Phil thing is text() doesn’t work hence the forum post. ... " added "Will replies in the antipodean AM"
13:54:48FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=46lR
13:54:51FromDiscord<4zv4l> it contains only this
13:55:03FromDiscord<4zv4l> (edit) "https://play.nim-lang.org/#ix=46lR" => "https://play.nim-lang.org/#ix=46lS"
13:56:51FromDiscord<hotdog> In reply to @4zv4l "it contains only this": Hmm
13:57:11FromDiscord<hotdog> Seems like maybe it is not updated for the latest compiler version
13:57:18FromDiscord<hotdog> ping @treeform 🙂
13:59:23ggsxin a template, to avoid to importing mymodule at each use of the template, I am using bind mymodule.`[]=`. I can then use it in the template like this mymodule.`[]=`(x, y, z) but not like this x[y] = z. is there a better way?
14:08:20*CyberTailor joined #nim
14:22:53*Guest2776 quit (Ping timeout: 252 seconds)
14:27:32FromDiscord<Phil> In reply to @ggsx "in a template, to": Why not export the module whose value you are binding?↵It's not ideal but I found it workable
14:33:00*Guest56 joined #nim
14:34:09Guest56Hi, I am trying to create a barebone UDP server, but I always get back 0 bytes. Am I missing something in the source?
14:34:09Guest56import std/net
14:34:10Guest56proc main() =
14:34:10Guest56  let socket = newSocket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)
14:34:11Guest56  socket.bindAddr(Port(8000))
14:34:11Guest56  while true:
14:34:12Guest56    var data, address: string
14:34:12Guest56    var length: int
14:34:13Guest56    var port: Port
14:34:13Guest56    let n = socket.recvFrom(data, length, address, port)
14:34:14Guest56    echo n," ", data," ", length," ", address, " ", port
14:34:14Guest56when isMainModule:
14:34:15Guest56  main()
14:34:54Guest56The result is:
14:34:55Guest560  0 127.0.0.1 34562
14:34:55Guest560  0 127.0.0.1 34562
14:34:56Guest560  0 127.0.0.1 34562
14:38:50ggsx@phil : I tried it, it didn't work for me, I am not familiar with export but I guess it could be because the import chain is long and I have generics too. I need to reduce the problem.
14:41:17ggsxstructuring a big project in nim appears to be the most difficult thing for me now
14:46:04FromDiscord<Phil> In reply to @ggsx "<@180601887916163073> : I tried": What was your error or what stopped you?↵Ambiguous symbols?
14:46:13Guest56ok, I found myself my error
14:46:29FromDiscord<Phil> Maybe you stumbled into a circular dependency?
14:46:44ggsx@Phil: Error: type mismatch: got ...
14:47:32ggsx@Phil: it doesn't see my []= but the system ones only
14:48:51*rockcavera joined #nim
14:48:52*rockcavera quit (Changing host)
14:48:52*rockcavera joined #nim
14:49:38*ggsx quit (Quit: Client closed)
14:51:27*ggsx joined #nim
14:54:51*Guest56 quit (Quit: Client closed)
14:58:01*ggsx quit (Quit: Client closed)
15:15:06*oz joined #nim
15:15:31*Guest2776 joined #nim
15:15:34*oz is now known as Guest2417
15:41:55NimEventerNew thread by Chaemon: String of compressed source code, see https://forum.nim-lang.org/t/9337
16:13:25FromDiscord<PyryTheBurger> what is the difference between result and return in procs
16:18:58FromDiscord<exelotl> return affects control flow, making the function exit immediately. You should prefer `result` or simply having the last expression in the procedure be the result (e.g. `proc add(a, b: int) = a + b`), unless you specifically want that early-exit behaviour
16:20:32*nisstyre quit (Changing host)
16:20:32*nisstyre joined #nim
16:24:13FromDiscord<Kermithos> can I check the type of a variable like this: `headers.type == string`? Or do I have to convert it to a string first?
16:35:49FromDiscord<exelotl> sent a code paste, see https://play.nim-lang.org/#ix=46mD
16:36:18FromDiscord<exelotl> note that `when` is a compile-time `if`.
16:37:32FromDiscord<Kermithos> In reply to @exelotl "nim is a statically": worked, thanks
16:38:11FromDiscord<hotdog> In reply to @exelotl "nim is a statically": You don't need that first typeof, it could also just be `when a is string`
16:38:21FromDiscord<exelotl> mmh yeah
16:38:38FromDiscord<exelotl> I originally did `typeof(a) == string` but that didn't work for some reason
16:44:29FromDiscord<PyryTheBurger> what is the difference between is and == then
16:51:15FromDiscord<treeform> In reply to @4zv4l "and when I run": Sorry we stopped using mddoc, we use nimdocs.com instead now. Maybe nim changed the way to generates docs so it does not work anymore?
16:56:31FromDiscord<!!sharpcdf!!> does `writeFile` append or write over the file
16:57:05FromDiscord<gibson> @PyryTheBurger `is` inspects the type. `==` inspects the value.
16:57:41FromDiscord<gibson> `of` inspects the object-oriented inheritance relationship.
17:00:58*fallback quit (Ping timeout: 240 seconds)
17:02:23*rwb quit (Ping timeout: 252 seconds)
17:04:12FromDiscord<treeform> In reply to @sharpcdf "does `writeFile` append or": writes over
17:08:28*rwb joined #nim
17:17:07*rwb quit (Ping timeout: 245 seconds)
17:17:31*rwb joined #nim
17:18:48FromDiscord<!!sharpcdf!!> alright
17:23:53FromDiscord<4zv4l> In reply to @treeform "Sorry we stopped using": alright ! thanks ^^
17:25:00FromDiscord<!!sharpcdf!!> In reply to @treeform "writes over": what about `writeLine`?
17:25:15FromDiscord<!!sharpcdf!!> i remember there being a shorthand proc for appending a line to a file
17:25:40FromDiscord<4zv4l> In reply to @treeform "Sorry we stopped using": I get this↵`404: https://github.com/4zv4l/ not allowed`
17:26:05FromDiscord<4zv4l> but my github repo is public↵https://github.com/4zv4l/wordle_nim
17:27:21FromDiscord<!!sharpcdf!!> In reply to @sharpcdf "what about `writeLine`?": whats the name of the proc that opens a filename, appends to it then closes it
17:30:27*rwb quit (Ping timeout: 245 seconds)
17:34:05FromDiscord<jmgomez> where does nimble looks for libcrypto-1_1-x64.dll? I have it in the nimsources/bin folder but it doesnt pick it up
17:38:45*rwb joined #nim
17:38:48FromDiscord<EyeCon> In reply to @jmgomez "where does nimble looks": This question has an incredibly complicated answer: https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order
17:39:15FromDiscord<EyeCon> Short answer, you're good if the DLL is in the same folder as the executable, hopefully
17:42:21FromDiscord<jmgomez> yeah, I have it there but as I said it doesnt pick it up. Thanks for the link though!
17:43:00FromDiscord<EyeCon> It's in the same directory as nimble itself, and cannot be found?
17:43:10FromDiscord<jmgomez> yes
17:44:10FromDiscord<jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=46mV
17:44:43*fallback joined #nim
17:45:34FromDiscord<jmgomez> (edit) "https://play.nim-lang.org/#ix=46mV" => "https://play.nim-lang.org/#ix=46mX"
17:45:56FromDiscord<treeform> In reply to @4zv4l "I get this `404:": Sorry during alpha, we only allow people we trust on nimdocs.com ... you can write your own server though.
17:46:29FromDiscord<treeform> https://github.com/treeform/nimdocs/blob/master/src/nimdocs.nim#L26
17:46:35FromDiscord<EyeCon> sent a code paste, see https://play.nim-lang.org/#ix=46mY
17:46:44FromDiscord<treeform> (edit) "write" => "run"
17:46:53FromDiscord<EyeCon> Note that it doesn't say it cannot be found, only that it cannot be loaded
17:48:59FromDiscord<jmgomez> In reply to @eyecon "You are on x64": yup
17:49:28FromDiscord<jmgomez> I got it from some random place on the net, will try to find another
17:50:03FromDiscord<jmgomez> BTW did anyone here the nimlangserver to work on win? It works pretty much of the box on macOs
17:50:22FromDiscord<EyeCon> In reply to @jmgomez "I got it from": Mine has SHA-1 `E7B955F64DB1C239EAD411E392CD1CCB6EDA3318`, in case it helps
17:50:40FromDiscord<jmgomez> (edit) "BTW did anyone ... heregot" added "in" | "inhere ... the" added "got"
17:51:16FromDiscord<EyeCon> In reply to @jmgomez "I got it from": It should be one of the files in https://nim-lang.org/download/dlls.zip - try that
17:51:34FromDiscord<EyeCon> Although I'm not sure, but can't hurt
17:52:17FromDiscord<4zv4l> In reply to @treeform "Sorry during alpha, we": alright xD
17:53:51FromDiscord<jmgomez> In reply to @eyecon "It should be one": aggh that worked out! Do you mind to share were that link is located in the docs?
17:53:55FromDiscord<jmgomez> Thanks a bunch!
17:54:08FromDiscord<EyeCon> In reply to @jmgomez "aggh that worked out!": It isn't 😔
17:54:24FromDiscord<geekrelief> In reply to @jmgomez "aggh that worked out!": I think I found it in a forum post
17:54:32FromDiscord<EyeCon> We need a "deployment" manual
17:54:49FromDiscord<EyeCon> In reply to @geekrelief "I think I found": Yes, along with another incredibly important link, let me find that
17:54:57FromDiscord<geekrelief> https://forum.nim-lang.org/t/9254#60610
17:55:00FromDiscord<EyeCon> https://forum.nim-lang.org/t/9254
17:55:18FromDiscord<jmgomez> haha cool, thanks!
17:55:28FromDiscord<geekrelief> there's an older thread where I found it though 🙂
17:55:40FromDiscord<jmgomez> IMO they should be more discoverable
17:56:42FromDiscord<geekrelief> In reply to @jmgomez "IMO they should be": when in doubt check google, discord, forum, github 🙂
17:59:53FromDiscord<jmgomez> In reply to @geekrelief "when in doubt check": yes, but it would be useful to have a document called working with sources or something like that that covers this small issues. Seems to me there are more hidden stuff like this
18:01:17FromDiscord<geekrelief> I think the issue is most people find the fix and then move on.
18:02:07FromDiscord<geekrelief> I don't even recall why I have these dlls anymore. I just know I needed them and they're in my path.
18:02:44FromDiscord<jmgomez> yes.. problem is that adds up
18:02:55FromDiscord<jmgomez> I think it's due to an issue with open ssl but not sure
18:03:29FromDiscord<geekrelief> maybe you can create an issue it's still fresh for you?
18:04:42FromDiscord<jmgomez> Im trying to figure out why the lang server doesnt work on Win but will definitely do it afterwards
18:05:33FromDiscord<geekrelief> Are you looking into the saem extension as well?
18:05:47FromDiscord<jmgomez> yes
18:39:02*wallabra quit (Ping timeout: 240 seconds)
18:41:23*wallabra joined #nim
19:16:47FromDiscord<Vivek> For anybody that's well versed with Nimpy/Nimporter, do you guys know how to convert from a python object (lists and numpy arrays) to nim sequences? I've been struggling with trying to read in data from python and passing that data into nim for computations.
19:19:40FromDiscord<Yardanico> See https://github.com/yglukhov/nimpy/blob/master/tests/numpytest.nim for an example for numpy
19:19:50FromDiscord<Yardanico> and for lists it should just work I think
19:22:30FromDiscord<Vivek> In reply to @Yardanico "and for lists it": It was going to be a bit inconvenient to pass in numpy arrays as parameters, so this is perfect
19:22:31FromDiscord<Vivek> thanks
19:40:09*Guest2417 is now known as om3ga
19:44:07NimEventerNew post on r/nim by AmazonEchoDotSupreme: GitHub - sharpcdf/jitter: A Github binary manager, see https://reddit.com/r/nim/comments/wdqhml/github_sharpcdfjitter_a_github_binary_manager/
19:50:33FromDiscord<SteveMCWin> Hey guys, I wanna get into Nim, and since I love coding shaders in GLSL I was wondering whether it's possible to do something like that with Nim.
19:55:20FromDiscord<Prestige> It is, seehttps://github.com/treeform/shady
19:55:25FromDiscord<Prestige> (edit) "seehttps://github.com/treeform/shady" => "see https://github.com/treeform/shady"
20:17:44FromDiscord<gibson> In reply to @NimEventer "New post on r/nim": This is a very popular kind of project lately. There are a lot of implementations and apparently no one is getting it right, because every few weeks someone releases their own version because nothing else was quite right.
20:18:19FromDiscord<huantian> the solution is to not use git for binaries 😛
20:18:34FromDiscord<gibson> What would you use?
20:19:13FromDiscord<huantian> actually I have no idea what exactly this project is
20:20:21FromDiscord<gibson> No problem.
20:21:17FromDiscord<huantian> uh I would just use a traditional package manager
20:21:38FromDiscord<huantian> because there's no good way to manage dependencies with github releases
20:21:39FromDiscord<gibson> And then you can't script for arbitrary platforms without root.
20:22:11FromDiscord<huantian> unless you only allow packaging formats that bundle dependencies, in which case just use flatpak
20:22:16FromDiscord<huantian> In reply to @gibson "And then you can't": wdym
20:22:45NimEventerNew thread by Cnerd: Ormin postgres backend with threads, see https://forum.nim-lang.org/t/9338
20:23:28FromDiscord<gibson> These projects often try to solve creating a uniform CLI for grabbing and installing software. For instance, "install NeoVim on whatever OS I'm on" = grab appropriate binary from github, extract, put somewhere expected.
20:23:52FromDiscord<gibson> (edit) "These projects often try to solve creating a uniform CLI for grabbing and installing software. For instance, "install NeoVim on whatever OS I'm on" = grab appropriate binary from github, extract, put somewhere expected. ... " added "(without root)"
20:24:40FromDiscord<huantian> other package managers can do the same
20:24:54FromDiscord<huantian> to try and make it work on all OSes is a fools errand
20:25:19FromDiscord<huantian> (edit) "same" => "same, ie nix can install systemwide and per-user"
20:25:48FromDiscord<gibson> "fools errand" == "it's very hard"
20:26:15FromDiscord<gibson> nix is not cross platform
20:27:02FromDiscord<huantian> I wasn't saying it was
20:27:33FromDiscord<huantian> In reply to @gibson ""fools errand" == "it's": very very very very very very very hard
20:28:26FromDiscord<gibson> Yeah I see. It's an interesting problem domain. I'm personally invested because I started one last year I hope to release this year. 🙂 Can't solve everything 100%, but it is possible to create a great ecosystem that solves most problems.
20:29:10FromDiscord<huantian> I just personally don't find any use for this when I can just use my package manager
20:29:21FromDiscord<!Patitotective> In reply to @huantian "I just personally don't": ~~apt 💀 ~~
20:29:45FromDiscord<gibson> Right, it's for people who would normally use docker/ansible, but can't for whatever reason (resources, admin, technical difficulty, etc.)
20:30:28FromDiscord<gibson> Especially in the High Performance Computing domain.
20:30:37FromDiscord<huantian> isn't the point of docker containerization + reproducibility?
20:30:46FromDiscord<gibson> Yes, so are these projects.
20:30:57FromDiscord<gibson> Except removing the container.
20:32:05FromDiscord<huantian> ig I'm just too privileged to understand 😛
20:32:19FromDiscord<huantian> In reply to @Patitotective "~~apt 💀 ~~": debain issue 😎
20:32:22FromDiscord<huantian> (edit) "debain" => "debian"
20:33:16FromDiscord<gibson> like how a nimble file describes a cross platform automation for setting up a new environment and dependent software. but instead think all software, not just nim modules.
20:33:34FromDiscord<!!sharpcdf!!> In reply to @gibson "This is a very": i just made it because i was bored 😂
20:33:55FromDiscord<gibson> I'm not complaining! I think it's interesting there's so much interest in this domain.
20:34:09FromDiscord<gibson> Very cool; I encourage you to work on it.
20:34:16FromDiscord<!!sharpcdf!!> thanks lol
20:34:25FromDiscord<!!sharpcdf!!> i made it really just for personal use but apparently other people were interested
20:34:43FromDiscord<gibson> sent a code paste, see https://play.nim-lang.org/#ix=46nk
20:35:37FromDiscord<huantian> In reply to @gibson "like how a nimble": isn't that a solved problem? like that's what nix does
20:35:48FromDiscord<gibson> nix is not cross platform.
20:35:57FromDiscord<huantian> well if you don't count windows as a platform
20:36:18FromDiscord<Prestige> Things get a lot easier when you don't count Windows as a platform, lol
20:36:48FromDiscord<gibson> Or you have admin access, that's also easier.
20:37:14FromDiscord<huantian> I mean sometimes you need admin access
20:37:23FromDiscord<gibson> Sometimes you will never get it.
20:37:32FromDiscord<!Patitotective> In reply to @Avahe "Things get a lot": Things get nice
20:39:38FromDiscord<huantian> In reply to @gibson "Sometimes you will never": never get that all programs can run without admin?
20:40:28FromDiscord<gibson> Yeah, even python, nim, c++, julia, rust, do not need admin to download and use. It's great.
20:41:26FromDiscord<gibson> Basically makes a security nightmare haha, but that's not my problem when admins refuse to install the software I need to get work done.
20:41:57FromDiscord<huantian> what about programs like steam, or drivers?
20:42:44FromDiscord<gibson> That's the "can't solve 100% everything" GPU drivers are the biggest thorn I can't solve, but it turns out that in all contexts desktop, HPC, web, where that's needed, it's already solved.
20:43:22FromDiscord<gibson> Stuff like that is critical enough, that services or admins have solved it.
20:44:22FromDiscord<gibson> Contexts = your desktop computer, all the way up to govt compute centers.
20:44:56FromDiscord<huantian> I think I personally haven't ran into the problem you're describing and I'm not the target demographic
20:45:21FromDiscord<gibson> I'll shut up then :p
20:45:51*krux02 joined #nim
20:45:52FromDiscord<huantian> nah no need lol, I was just curious on exactly the goals of your project
20:46:02FromDiscord<huantian> and I think I undestand more now
20:46:08FromDiscord<Prestige> I don't miss having to work on a govt. controlled windows pc
20:46:16FromDiscord<gibson> It's really for "when does Docker fail?" it's those use cases.
20:46:33FromDiscord<gibson> In reply to @Avahe "I don't miss having": Oh gross! I'm sorry.
20:47:10FromDiscord<huantian> In reply to @gibson "It's really for "when": yeah makes sense, I just never used docker so it never failed for me 😛
20:47:20FromDiscord<gibson> In reply to @huantian "yeah makes sense, I": I am sooo jealous.
20:48:17FromDiscord<gibson> In reply to @gibson "Why does this fail?": I don't even know the words to search this issue in the Nim github issues... 🤔
20:49:04FromDiscord<huantian> Actually I’ve used it once or twice for simple stuff, but I think I’m happy with how Nix does things, but there is a huge cost in switching ot jt
20:49:08FromDiscord<huantian> (edit) "jt" => "it"
20:49:37FromDiscord<gibson> I understand. I researched the nix way before beginning my project. It was.. intense.
20:49:52FromDiscord<huantian> In reply to @gibson "I don't even know": myabe it's cus of plain `tuple` as a param?
20:50:19FromDiscord<gibson> But the order determines error vs no error? I don't understand that part.
20:50:38FromDiscord<Prestige> I would think it shouldn't compile either way
20:50:51FromDiscord<Yardanico> In reply to @Avahe "I would think it": nah using `tuple` like that is fine, it's a generic typeclass by itself
20:51:06FromDiscord<Yardanico> same as you can do `object`
20:51:06FromDiscord<Prestige> Ah, I see
20:51:18FromDiscord<Yardanico> useful for generic programming, especially combined with `fields` or `fieldPairs`
20:51:29FromDiscord<Yardanico> but yeah, maybe it's bugging when using as template argument types
20:54:11FromDiscord<gibson> Also, strangely (to me), `openArray` must be used alone. It is not a typeclass -- I guess that makes some sense. I'm so used to thinking of it like a composite typeclass.
21:02:49NimEventerNew thread by Ggibson: Composite type bug? Order makes difference., see https://forum.nim-lang.org/t/9339
21:28:05*xet7 joined #nim
21:28:14*CyberTailor quit (Ping timeout: 268 seconds)
21:28:48*CyberTailor joined #nim
21:35:35FromDiscord<topmark> Hi, does anyone know how to disable targeting JS when using a nimscript?↵↵I'm trying to use nim as a shell scripting language, and whenever I use certain file commands like copyDir, it says "Error: this proc is not available on the NimScript/js target". I understand why that would be so, but I don't care to target JS, I just want to run the script in a terminal like `nim script.nims`. I've tried googling and stackoverflow, it's not cl
21:37:22*wallabra_ joined #nim
21:38:58qwri think its just a message used for both nimscript and js targets
21:39:26*wallabra quit (Ping timeout: 240 seconds)
21:39:27*wallabra_ is now known as wallabra
21:40:14*dv^_^9 joined #nim
21:41:02qwrnimscript is run by interpreter, and i guess that it doesn't support C FFI
21:41:17*jkl1337 joined #nim
21:42:32*void09_ joined #nim
21:42:53FromDiscord<topmark> Thanks for your reply. It does not complete the task. It doesn't even seem to start executing the script, so I think the error happens while it's analyzing before it runs the script
21:43:19*dextop_ joined #nim
21:43:25*tk quit (Ping timeout: 272 seconds)
21:43:42*qwr uses nim for samething resembling shell scripting, but i'm just compiling the code to native binary
21:48:16*void09 quit (*.net *.split)
21:48:17*jkl quit (*.net *.split)
21:48:17*oddish quit (*.net *.split)
21:48:17*dv^_^ quit (*.net *.split)
21:48:17*dextop quit (*.net *.split)
21:48:17*dv^_^9 is now known as dv^_^
21:49:34*vicecea quit (Remote host closed the connection)
21:50:07*vicecea joined #nim
21:54:11FromDiscord<amadan> In reply to @topmark "Hi, does anyone know": `cpDir` is the version that runs on nimscript (https://nim-lang.org/docs/nimscript.html#cpDir%2Cstring%2Cstring)
21:54:15*TakinOver quit (Ping timeout: 252 seconds)
22:00:07FromDiscord<topmark> @amadan Oh thank you! That works! Somehow I wandered off that nimscript page to the std/os doc page...
22:02:55FromDiscord<Prestige> Is there a way to clear a `set`?
22:03:04qwrreset
22:03:20FromDiscord<Prestige> ah, thank you
22:47:46FromDiscord<Require Support> `value out of range: -36 notin 0 .. 9223372036854775807` no idea what this error means.. im trying to pull everything from the string except the first 36 chars using `myvar[36 .. ^1]`
22:48:10FromDiscord<Require Support> (edit) "means.." => "means."
22:49:04FromDiscord<!Patitotective> how long is your string?
22:49:54FromDiscord<Require Support> pretty long... 🙂
22:50:16FromDiscord<!Patitotective> whats its length?
22:52:46FromDiscord<Require Support> no idea, im getting it as a response from a server. it's nearly 512KB in bytes
22:53:25FromDiscord<!Patitotective> try to provide a reproducible snippet 🤷‍♂️
22:54:16FromDiscord<Require Support> is there a certain limit to my string? or what are you suspecting the problem is
22:54:34FromDiscord<huantian> You probably don’t want to store that in a string, you might have better luck with a steam 😛
22:54:52FromDiscord<!Patitotective> https://nim-lang.org/docs/streams.html
22:55:19FromDiscord<Require Support> thanks ill try it out
23:03:01*tk joined #nim
23:12:07*tk quit (Quit: Well, this is unexpected.)
23:12:53*tk joined #nim
23:21:18FromDiscord<#!/rip/luke> Can I run nimscript from the command line?
23:21:26FromDiscord<#!/rip/luke> Something like python -c
23:24:57CyberTailornim --eval:'echo "Hello world!"'
23:28:38FromDiscord<#!/rip/luke> Oh
23:40:42qwrthe startup overhead of nimscript is considerable - i wrote hello.nims and hello.pl for comparison, and on odroid-n2 those ran 0m0.425s for nimscript and 0m0.006s for perl (on faster system it might not matter)
23:42:51qwrtbh, i don't know _any_ language which is nice to use and has both fast startup and reasonably fast runtime without ahead-of-time compilation
23:44:19FromDiscord<#!/rip/luke> Made a command that runs Nim code https://media.discordapp.net/attachments/371759389889003532/1003810439374831697/IMG_1820.png
23:48:18FromDiscord<!Patitotective> what?
23:48:33FromDiscord<#!/rip/luke> Wdym what
23:48:50FromDiscord<!Patitotective> you made !eval?
23:48:54FromDiscord<#!/rip/luke> Yup
23:49:19FromDiscord<!Patitotective> !eval import os:for files in walkDir("."): echo files.path
23:49:23NimBotCompile failed: /usercode/in.nim(1, 10) Error: invalid indentation
23:49:28FromDiscord<!Patitotective> damn
23:49:38FromDiscord<!Patitotective> !eval import os;for files in walkDir("."): echo files.path
23:49:44NimBotCompile failed: ./nimble↵./nim
23:49:54FromDiscord<#!/rip/luke> The semicolon isn't valid nim
23:50:04FromDiscord<!Patitotective> it is
23:50:09FromDiscord<#!/rip/luke> In my code it's replaced with a newline char
23:50:16FromDiscord<#!/rip/luke> In reply to @Patitotective "it is": You sure?
23:50:22FromDiscord<!Patitotective> yes
23:50:36FromDiscord<#!/rip/luke> Oh well I replace it with a newline charecter
23:50:41FromDiscord<!Patitotective> thats better
23:50:50FromDiscord<huantian> What if you have a semicolon in a string tho
23:50:54FromDiscord<!Patitotective> because you can't do two inline blocks (?)
23:50:58FromDiscord<!Patitotective> In reply to @huantian "What if you have": die
23:51:10FromDiscord<#!/rip/luke> In reply to @huantian "What if you have": Itll get replaced XD
23:51:25FromDiscord<#!/rip/luke> But I mean I don't really use semicolons in strings
23:51:35FromDiscord<huantian> You should just have it accept code blocks
23:51:36FromDiscord<!Patitotective> In reply to @ripluke "Yup": but, not this server's eval, right
23:51:54FromDiscord<#!/rip/luke> What
23:51:58FromDiscord<#!/rip/luke> No
23:52:09FromDiscord<#!/rip/luke> I can send the code if u want lol
23:52:24FromDiscord<!Patitotective> so a discord bot?
23:52:48FromDiscord<#!/rip/luke> Yup
23:53:00FromDiscord<!Patitotective> nice
23:53:20FromDiscord<!Patitotective> you should just accept multiple lines instead of replacing ; with new lines lol
23:54:06FromDiscord<#!/rip/luke> In reply to @Patitotective "you should just accept": It can do that too
23:54:18FromDiscord<!Patitotective> then you shouldnt replace ; at all
23:54:29FromDiscord<#!/rip/luke> I prefer using semicolons tho
23:54:51FromDiscord<#!/rip/luke> sent a code paste, see https://play.nim-lang.org/#ix=46nN
23:54:59FromDiscord<!Patitotective> In reply to @ripluke "I prefer using semicolons": you can
23:55:25FromDiscord<!Patitotective> but dont replace the semicolons↵nim will parse the semicolons later
23:55:26FromDiscord<#!/rip/luke> (edit) "https://play.nim-lang.org/#ix=46nN" => "https://play.nim-lang.org/#ix=46nO"
23:55:36FromDiscord<#!/rip/luke> ohk