00:40:29 | * | Gustavo6046 quit (Quit: what if I am turning narcissist? pretentious, asocial, inpromptu squabbles, easily become childishness from the slightest emotional distress.. i feel like I've only truly grown up on the outside, and it's painful to remain this way, but it's far from the) |
00:47:49 | * | elph quit (Quit: Connection closed for inactivity) |
00:51:43 | * | pch quit (Remote host closed the connection) |
00:52:30 | * | pch joined #nim |
01:18:38 | * | neurocyte0132889 quit (Ping timeout: 260 seconds) |
01:48:30 | * | Gustavo6046 joined #nim |
03:01:36 | * | arkurious quit (Quit: Leaving) |
04:06:02 | * | supakeen quit (Quit: WeeChat 3.3) |
04:06:31 | * | supakeen joined #nim |
04:53:04 | FromDiscord | <Rika> can i emit a warning when a generic param has a certain value? |
04:53:20 | NimEventer | New Nimble package! uncomment - uncomment the codes at the compile time, see https://github.com/hamidb80/uncomment |
04:53:26 | FromDiscord | <Rika> i dont want to disallow it, but i want to inform that it may be an issue |
04:53:51 | FromDiscord | <Rika> the generic param is of `static T` form |
04:56:34 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#ix=3CyM ? |
05:02:15 | FromDiscord | <Rika> i want to warn on type creation |
05:02:59 | FromDiscord | <Rika> sorry i didnt speciry |
05:03:01 | FromDiscord | <Rika> (edit) "speciry" => "specify" |
05:03:08 | FromDiscord | <Rika> this is for types, not a proc |
05:05:02 | FromDiscord | <Elegantbeef> Dont think the type system allows that but i do have an idea |
05:13:01 | FromDiscord | <Rika> its fine if its not doable w/o a macro because im betting you're doing a macro right now |
05:13:16 | FromDiscord | <Elegantbeef> Indeed |
05:13:26 | FromDiscord | <Elegantbeef> It's almost certainly doable with a term rewriting macro |
05:13:33 | FromDiscord | <Rika> oh lord no |
05:13:39 | FromDiscord | <Elegantbeef> They're just fun macros to fight with |
05:30:02 | FromDiscord | <Illusive> In reply to @Yardanico "Because otherwise you'll be": thanks changed |
06:05:36 | FromDiscord | <Illusive> Is there any code formatter for Nim? Like rustfmt in case of Rust |
06:07:41 | * | rockcavera quit (Remote host closed the connection) |
06:11:37 | FromDiscord | <Elegantbeef> nimpretty is the official one then there are others like morepretty by treeform |
06:12:42 | FromDiscord | <Rika> Neither are flexible if you’re looking for a configurable formatter |
06:32:48 | Mister_Magister | guys i'm using simple asynchttpserver that just responds to requests with text nothing fancy but randomly i'm getting Error: unhandled exception: No route to host [OSError]. i tried putting try except on function that handles the request but that did not help :< |
06:34:00 | NimEventer | New thread by Krakengore: Enforced sink argument, see https://forum.nim-lang.org/t/8531 |
09:36:16 | FromDiscord | <Hamid Bluri> sent a code paste, see https://play.nim-lang.org/#ix=3Czz |
09:37:10 | FromDiscord | <Hamid Bluri> (edit) "https://play.nim-lang.org/#ix=3Czz" => "https://play.nim-lang.org/#ix=3CzA" |
09:40:08 | FromDiscord | <Hamid Bluri> In reply to @Mister_Magister "guys i'm using simple": share your code |
09:40:19 | FromDiscord | <Hamid Bluri> (edit) "share" => "share/send" |
09:45:38 | FromDiscord | <Hamid Bluri> In reply to @hamidb80 "hey, i dont remember": it works in a `macro` but not a `template` : -\ |
09:56:51 | FromDiscord | <Rika> templates are copy-paste |
09:58:10 | FromDiscord | <Rika> sent a code paste, see https://play.nim-lang.org/#ix=3CzD |
10:15:06 | * | [R] quit (Ping timeout: 245 seconds) |
10:15:14 | * | [R] joined #nim |
11:02:17 | * | Vladar joined #nim |
11:09:42 | FromDiscord | <tandy> is there any way to parseInt in js backend? |
11:09:54 | FromDiscord | <tandy> strutils is complaining cos the string is a cstring |
11:11:44 | FromDiscord | <haxscramper> `$<yourCstringg>` |
11:11:52 | FromDiscord | <tandy> oh epic |
11:20:42 | FromDiscord | <tandy> tables work in js right? |
11:21:04 | FromDiscord | <tandy> sent a code paste, see https://play.nim-lang.org/#ix=3CzL |
11:21:34 | FromDiscord | <tandy> im getin some weird erors when trying to convert a `seq[tuple[key, value: cstring]]` to a `TableRef[string, seq[string]]` |
11:21:38 | FromDiscord | <zetashift> should a formatter really be flexible though \:P, I like opinionated formatters more so I can think less haha↵(@Rika) |
11:21:46 | FromDiscord | <Rika> It depends on the person |
11:21:54 | FromDiscord | <Rika> I personally want a flexible formatter |
11:47:49 | FromDiscord | <haxscramper> what errors |
11:47:58 | FromDiscord | <tandy> ^ |
11:48:03 | FromDiscord | <haxscramper> Also `cstring` is not a `string` |
11:48:20 | FromDiscord | <haxscramper> there is no errors her |
11:48:33 | FromDiscord | <tandy> sent a code paste, see https://paste.rs/Lqh |
11:48:47 | FromDiscord | <tandy> i cast the cstring to string |
11:48:47 | FromDiscord | <haxscramper> well, it says that it got seq and expected table |
11:48:57 | FromDiscord | <tandy> `var h = cast[seq[(string, string)]](response.headers.entries)` |
11:48:58 | FromDiscord | <tandy> `h.toTable().pairs.toSeq)` |
11:49:01 | FromDiscord | <haxscramper> no |
11:49:03 | FromDiscord | <haxscramper> that's wrong |
11:49:06 | FromDiscord | <tandy> oh |
11:49:12 | FromDiscord | <haxscramper> `cast` is an unsafe low-level C-specific operation |
11:49:20 | FromDiscord | <tandy> ohhh im so silly |
11:49:36 | FromDiscord | <haxscramper> you need to convert cstring to string or something along those lines using `$` |
11:50:51 | FromDiscord | <haxscramper> Something like `<seq[tuple[key, value: cstring]]>.mapIt(($it.key, @[$it.value]).newTableRef()` |
11:51:06 | FromDiscord | <haxscramper> Or if there is no `newTableRef` constructor that takes sequence you can construct it in a loop |
11:52:58 | FromDiscord | <tandy> '`it` is an undeclared identifier' |
11:56:27 | FromDiscord | <haxscramper> mapIt injects it |
11:57:10 | FromDiscord | <tandy> sent a code paste, see https://play.nim-lang.org/#ix=3CzQ |
11:57:52 | FromDiscord | <haxscramper> can you show the code? |
11:58:09 | FromDiscord | <tandy> `response.headers.entries.mapIt($it.key, @[$it.value]).toTable()` |
11:58:16 | FromDiscord | <tandy> il try using sugar.collect |
11:58:21 | FromDiscord | <haxscramper> omg |
11:58:32 | FromDiscord | <haxscramper> `mapIt(($it.key, @[$it.value]))` |
11:58:39 | FromDiscord | <haxscramper> not `mapIt($it.key...` |
11:58:45 | FromDiscord | <haxscramper> You map to tuples |
11:58:47 | FromDiscord | <tandy> \:x |
11:58:53 | FromDiscord | <haxscramper> `mapIt` takes two arguments, no three |
11:59:07 | FromDiscord | <haxscramper> first is a `response.header.entries`, second one is a untyped expression that will be executed |
11:59:16 | FromDiscord | <haxscramper> in that case it is a `($it.key, @[$it.value])` |
12:03:46 | FromDiscord | <evoalg> noob question: if I declare with "let" instead of "var", I know it's immutable, but is using "let" faster (more efficient) or is it more a case of good practice to make sure nothing changes that shouldn't? |
12:05:06 | FromDiscord | <haxscramper> it has no performance implications, but it is a good practice to use `let` |
12:05:25 | FromDiscord | <haxscramper> Because it makes it easier to read the code since you know there are no after-edits |
12:05:43 | FromDiscord | <evoalg> gotcha thank you ... makes sense |
12:06:02 | * | supakeen quit (Quit: WeeChat 3.3) |
12:06:33 | * | supakeen joined #nim |
12:53:14 | * | pyrotao joined #nim |
12:59:21 | * | pyrotao quit (Remote host closed the connection) |
13:00:29 | * | pyrotao joined #nim |
13:01:30 | Amun-Ra | is there a way of checking if a value is in enum? |
13:04:10 | Amun-Ra | other than https://play.nim-lang.org/#ix=3CAc |
13:15:29 | FromDiscord | <exelotl> if it's a non-holey enum, you can do `x in ord(Flag.low)..ord(Flag.high)` |
13:17:47 | * | pyrotao quit (Remote host closed the connection) |
13:17:58 | Amun-Ra | unfortunately it is, I ended up with something like this: https://play.nim-lang.org/#ix=3CAh |
13:18:14 | * | pyrotao joined #nim |
13:18:47 | * | pyrotao quit (Remote host closed the connection) |
13:19:53 | FromDiscord | <haxscramper> https://nim-lang.github.io/Nim/enumutils.html#items.i%2Ctypedesc%5BT%5D |
13:20:40 | FromDiscord | <haxscramper> I don't know what it the use case of `B[T] = enum` |
13:20:47 | FromDiscord | <haxscramper> TIL you can even do this |
13:21:14 | FromDiscord | <Rika> Attaching compile time info to a type |
13:21:35 | FromDiscord | <Rika> At least that’s what I use it for |
13:22:00 | FromDiscord | <haxscramper> You use it with enums? |
13:22:15 | FromDiscord | <haxscramper> Do you have an example |
13:24:16 | FromDiscord | <Rika> Not enums yeah was just stating a general example |
13:24:29 | FromDiscord | <Rika> For putting a generic type on something without using it on a field |
13:25:21 | FromDiscord | <haxscramper> this compiles and runs |
13:25:24 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3CAk |
13:25:39 | FromDiscord | <haxscramper> in general yes, it makes sense |
13:25:46 | FromDiscord | <haxscramper> `A[T] = distinct B` etc. |
13:26:04 | FromDiscord | <haxscramper> pmunch's talk on microcontrollers with `w, h: static[int]` |
13:26:27 | FromDiscord | <haxscramper> Seems like this feature is kind of buggy |
13:26:38 | FromDiscord | <haxscramper> because those are two distinct enum values IMO |
13:26:45 | FromDiscord | <Rika> I guess it doesn’t make sense on enums but I assume this is only because they are not special cased to disallow generics |
13:26:49 | FromDiscord | <haxscramper> `b0` of `B[int]` and `b1` of `B[float]` |
13:27:55 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3CAl |
13:29:32 | NimEventer | New post on r/nim by owl_000: One important thing I want to say!, see https://reddit.com/r/nim/comments/qe4ybb/one_important_thing_i_want_to_say/ |
13:33:32 | * | arkurious joined #nim |
13:37:24 | * | ehmry quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
13:37:28 | * | emery joined #nim |
13:44:38 | * | ozzz joined #nim |
14:05:46 | * | Gustavo6046 quit (Read error: Connection reset by peer) |
14:30:14 | * | rockcavera joined #nim |
14:30:14 | * | rockcavera quit (Changing host) |
14:30:14 | * | rockcavera joined #nim |
15:00:10 | FromDiscord | <Illusive> so on windows |
15:00:17 | FromDiscord | <Illusive> i am trying to build my program |
15:00:30 | FromDiscord | <Illusive> it says error cannot importc |
15:00:37 | FromDiscord | <Illusive> at compile time |
15:01:12 | FromDiscord | <Rika> can you show the whole error |
15:01:27 | FromDiscord | <enthus1ast> guess you assign something to a const? |
15:01:28 | FromDiscord | <Illusive> https://media.discordapp.net/attachments/371759389889003532/901485480355442688/unknown.png |
15:01:52 | FromDiscord | <enthus1ast> how do you compile? |
15:03:18 | FromDiscord | <Illusive> ? |
15:03:49 | FromDiscord | <enthus1ast> can you show the cmdline you use for compiling? |
15:05:00 | FromDiscord | <Illusive> nvm |
15:05:04 | FromDiscord | <Illusive> i got it working |
15:05:07 | FromDiscord | <Illusive> i think |
15:43:20 | FromDiscord | <Goel> `assert urandom(1234) != urandom(1234) # unlikely to fail in practice`↵Such confidence 😆 |
15:43:59 | FromDiscord | <Goel> (edit) "`assert urandom(1234) != urandom(1234) # unlikely to fail in practice`↵Such confidence 😆" => "sent a code paste, see https://play.nim-lang.org/#ix=3CAX" |
15:47:07 | FromDiscord | <Illusive> Is there a Reddit API implementation for Nim? |
16:09:32 | FromDiscord | <Yardanico> no, but it should be pretty easy to do as it's just JSON |
16:34:09 | FromDiscord | <retkid> If I close a socket then reconnect I get a "bad file error" |
16:34:13 | FromDiscord | <retkid> and nothing is sent |
16:45:07 | * | rockcavera quit (Remote host closed the connection) |
16:49:23 | FromDiscord | <enthus1ast> never have tried to reuse a socket, idk if this is supported |
16:49:33 | FromDiscord | <enthus1ast> why not just create a new one? |
16:50:28 | Amun-Ra | enthus1ast: it doesn't work like that |
16:50:57 | FromDiscord | <enthus1ast> what do you mean? |
16:52:13 | FromDiscord | <demotomohiro> `setSockOpt(OptReuseAddr, true)` might help |
16:53:19 | FromDiscord | <Illusive> so |
16:53:56 | FromDiscord | <Illusive> i wanna implement if specific .env file doesn't exist, then write a messege to create a one, if it is available then load the .env file |
16:54:18 | FromDiscord | <retkid> In reply to @enthus1ast "why not just create": its ugly |
16:54:18 | FromDiscord | <Illusive> (edit) "i" => "I" | "if" => "and then exit. If" |
16:55:50 | * | Gustavo6046 joined #nim |
16:56:23 | FromDiscord | <Yardanico> In reply to @Illusive "I wanna implement if": and what is the issue? |
16:57:03 | FromDiscord | <Yardanico> all procs that you want are in `std/os` and in system (which is imported by default) |
16:57:06 | FromDiscord | <retkid> In reply to @demotomohiro "`setSockOpt(OptReuseAddr, true)` might help": nothing really |
16:57:25 | FromDiscord | <Illusive> sent a code paste, see https://play.nim-lang.org/#ix=3CBl |
16:57:34 | FromDiscord | <Yardanico> yes, I understand, so what is the issue? |
16:57:59 | FromDiscord | <Yardanico> fileExists from os, `quit` from os, https://github.com/euantorano/dotenv.nim for reading .env files if you don't want to implement that yourself |
17:00:31 | * | Gustavo6046 quit (Ping timeout: 245 seconds) |
17:00:50 | * | Gustavo6046 joined #nim |
17:02:46 | FromDiscord | <Illusive> thanks |
17:02:47 | FromDiscord | <Illusive> works |
17:11:18 | FromDiscord | <Hamid Bluri> In reply to @Rika "templates are copy-paste": i guess sometimes i have to relearn what i've already know 😕 |
17:16:30 | Mister_Magister | @Hamid Bluri https://paste.opensuse.org/ec036dcf |
17:16:53 | Mister_Magister | its running fine for like 20 minutes then starts spewing : No route to host [OSError] and doesn't recover |
17:21:35 | FromDiscord | <Illusive> tbh nim docs are bit of confusing for me? |
17:21:48 | FromDiscord | <Illusive> maybe that's just because i am coming from rust with it's docs.rs |
17:30:18 | FromDiscord | <enthus1ast> i see no obvious mistakes in your code↵(<@709044657232936960_=4dister_=4dagister=5b=49=52=43=5d>) |
17:30:57 | FromDiscord | <enthus1ast> do you have a stacktrace? |
17:42:28 | FromDiscord | <Illusive> Does `Dimscord` support slash commands? |
17:42:53 | FromDiscord | <Rika> Yes |
17:43:07 | FromDiscord | <Rika> In reply to @Illusive "tbh nim docs are": What’s confusing |
17:43:34 | FromDiscord | <Illusive> Good, can you link to the slash commands documentation then please? |
17:50:58 | FromDiscord | <rainbowasteroids> nim strings are stored as UTF8 strings, right? |
17:54:25 | FromDiscord | <haxscramper> no, nim strings are byte sequences |
18:08:56 | FromDiscord | <rainbowasteroids> what makes nim strings different from seq[char]? |
18:10:11 | FromDiscord | <haxscramper> as of right now - nothing |
18:10:34 | FromDiscord | <haxscramper> but this is considered an implementation detail and should not be exploited |
18:11:09 | FromDiscord | <haxscramper> For working with Unicode in nim strings, look in the `std/unicode` module |
18:12:34 | FromDiscord | <rainbowasteroids> > ↵> as of right now↵> does that mean there's plans to make strings more than just `distict seq[char]`?↵> |
18:12:50 | FromDiscord | <haxscramper> string is not a `distinct seq[char]` |
18:13:05 | FromDiscord | <rainbowasteroids> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/901533573008486540): > as of right now↵does that mean there's plans to make strings more than just `distict seq[char]`? |
18:13:11 | FromDiscord | <haxscramper> they are implemented identically, I haven't said they are the same type + `distinct` |
18:13:51 | FromDiscord | <Illusive> In reply to @Illusive "Good, can you link": https://github.com/ire4ever1190/dimscmd |
18:13:52 | FromDiscord | <haxscramper> But string and `seq[char]` have the same memory layout and management behavior |
18:13:54 | FromDiscord | <Illusive> answer for myself |
18:14:39 | FromDiscord | <haxscramper> for example you are allowed but advised not to `cast[seq[char]](<some string>)` |
18:15:22 | FromDiscord | <rainbowasteroids> So is there any plans to change nim strings in the future? |
18:15:31 | FromDiscord | <haxscramper> none that I'm aware of |
18:24:36 | Mister_Magister | @illusive they are confusing as heck |
18:31:16 | FromDiscord | <Illusive> In reply to @Mister_Magister "<@790153860130799616> they are confusing": the nim docs in general are pretty confusing for me |
18:31:19 | FromDiscord | <Illusive> lol |
18:31:44 | FromDiscord | <enthus1ast> what do you find confusing? |
18:32:11 | FromDiscord | <Illusive> In reply to @enthus1ast "what do you find": so let me explain in terms of rust |
18:32:18 | FromDiscord | <Illusive> so rust has crates.io and docs.rs |
18:32:26 | FromDiscord | <Illusive> first one is kind of repo for all rust programs |
18:32:40 | FromDiscord | <Illusive> and docs.rs is one repo for crates docs |
18:33:06 | Mister_Magister | me coming from php, they are confusing as heck |
18:33:09 | Mister_Magister | hard to find any info |
18:33:12 | FromDiscord | <Illusive> in nim there's isn't i think the central place where to get documentation |
18:33:32 | Mister_Magister | most of time i come ask here because finding it in docs will take me literal hours |
18:33:55 | FromDiscord | <enthus1ast> well there is nimble.directory but i must admit i like to just read the nim docs or the project docs |
18:34:07 | Mister_Magister | for example in response to my issue |
18:34:09 | Mister_Magister | https://nim-lang.org/docs/asynchttpserver.html#serve%2CAsyncHttpServer%2CPort%2Cproc%28Request%29%2Cstring%2Cint |
18:34:14 | Mister_Magister | nowhere it mentions it can throw exception |
18:34:43 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/901539145061658714/image.png |
18:34:47 | FromDiscord | <Elegantbeef> Click the three dots at the end |
18:35:00 | Mister_Magister | see |
18:35:03 | FromDiscord | <Elegantbeef> Hit's hidden for sadly but it's there |
18:35:04 | Mister_Magister | here you get the confusing part |
18:35:12 | FromDiscord | <enthus1ast> this was hidden because some new user find it confusing \:) |
18:35:40 | Mister_Magister | xd |
18:35:48 | Mister_Magister | anyway can someone help me please |
18:36:02 | Mister_Magister | worst part is that it doesn't recover |
18:36:22 | FromDiscord | <enthus1ast> i think its not in your code |
18:36:32 | FromDiscord | <enthus1ast> your code looks ok i guess |
18:36:49 | FromDiscord | <enthus1ast> can you provide a stacktrace? |
18:36:52 | Mister_Magister | well i know that much :P |
18:36:56 | Mister_Magister | sure |
18:36:58 | FromDiscord | <Hamid Bluri> let me see |
18:37:57 | Mister_Magister | https://paste.opensuse.org/081b898c heres stack trace |
18:38:12 | FromDiscord | <Hamid Bluri> i didn't that i can define tuples that way : / |
18:38:19 | FromDiscord | <Hamid Bluri> i didmt know |
18:38:25 | FromDiscord | <Hamid Bluri> damn |
18:38:43 | Mister_Magister | you live you learn |
18:39:09 | FromDiscord | <Illusive> bruh moment https://media.discordapp.net/attachments/371759389889003532/901540261849624606/unknown.png |
18:39:12 | FromDiscord | <enthus1ast> 1.2 is ancient |
18:39:18 | Mister_Magister | 1.4 does same thing |
18:40:39 | Mister_Magister | now i did choosenim devel, cleared cache and recompiled |
18:40:46 | Mister_Magister | will test if it still happens |
18:42:42 | FromDiscord | <enthus1ast> the message is strange never encountered "No route to host" while reading from a socket |
18:43:39 | FromDiscord | <Hamid Bluri> i have nim devel 1.7.1 |
18:44:12 | FromDiscord | <Hamid Bluri> is running it for 20 mins enoght to produce the error? |
18:44:16 | FromDiscord | <Illusive> in nim |
18:44:28 | FromDiscord | <Illusive> is there a some kind of requirements.txt file? like in python? |
18:44:43 | FromDiscord | <Hamid Bluri> In reply to @Illusive "is there a some": we put that in package.nimble |
18:44:56 | FromDiscord | <Hamid Bluri> well `package` is your package name |
18:45:01 | FromDiscord | <Illusive> yeah |
18:45:05 | FromDiscord | <Illusive> it is obvious |
18:45:11 | FromDiscord | <Hamid Bluri> you can init a package by `nimble init` |
18:46:05 | Mister_Magister | @Hamid its really hard to tell what causes the error, but it needs requests i think |
18:46:52 | FromDiscord | <Hamid Bluri> can you make a postman file for to make request to those routes? |
18:47:00 | FromDiscord | <Hamid Bluri> for me |
18:48:00 | Mister_Magister | http://localhost:9100/addMetrics?name=x&value=x&metricType=x&client=x and http://localhost:9100/metrics |
18:48:05 | FromDiscord | <enthus1ast> maybe you can use "ab" |
18:48:11 | Mister_Magister | whats ab |
18:48:27 | FromDiscord | <enthus1ast> "ab - Apache HTTP server benchmarking tool" |
18:48:40 | FromDiscord | <Hamid Bluri> آب means water in my lang |
18:50:15 | Mister_Magister | i think it could be due to how im making requests. i'm doing requests to it from esp that just requests said url and then turns off wifi so that could cause no route to host if it tries to read |
18:50:22 | Mister_Magister | but i don't like that it doesn't recover |
18:53:03 | FromDiscord | <Hamid Bluri> send the stack trace if you could produce it with new nim version |
18:53:27 | Mister_Magister | oki |
18:58:19 | FromDiscord | <Hamid Bluri> @Minster_Magister you can use `OrderedTable` by the way |
18:59:41 | FromDiscord | <Hamid Bluri> and you don't need to define all these funcs `[]`, `[]=` |
19:10:58 | NimEventer | New thread by Tzzza: Asyncmacro.nim(130, 3) Error: 'yield' only allowed in an iterator, see https://forum.nim-lang.org/t/8532 |
19:11:35 | FromDiscord | <enthus1ast> docks.rs gives the same information than the build in nim docs imho |
19:11:53 | FromDiscord | <enthus1ast> s/than/as/ |
19:13:00 | FromDiscord | <enthus1ast> just looks a little different |
19:13:23 | * | xet7 quit (Remote host closed the connection) |
19:14:15 | * | xet7 joined #nim |
19:14:38 | FromDiscord | <enthus1ast> to get an overview of the stdlib you can also use\: |
19:14:38 | FromDiscord | <enthus1ast> https://nim-lang.org/docs/theindex.html |
19:22:32 | * | Guest73 joined #nim |
19:23:06 | * | Guest73 quit (Client Quit) |
19:23:27 | FromDiscord | <Hamid Bluri> any news? Mister |
19:28:37 | FromDiscord | <SivadNai> Does anyone know if Nim works on chrome os? |
19:32:23 | FromDiscord | <zetashift> Could use Termux in ChromeOS and get Nim that wya |
19:36:40 | FromDiscord | <Illusive> so i was looking for some examples for discord bots |
19:36:46 | FromDiscord | <Illusive> found this https://raw.githubusercontent.com/RustyRaptor/Fortemps-bot/main/src/fortemps.nim |
19:37:08 | FromDiscord | <Illusive> sent a code paste, see https://play.nim-lang.org/#ix=3CBS |
19:37:10 | FromDiscord | <Illusive> what this thing should do here? |
19:37:59 | FromDiscord | <Gumber> In reply to @Illusive "what this thing should": who knows - why are you asking us what a `# TODO` in some random person's code is for??? |
19:44:05 | FromDiscord | <Illusive> well |
19:44:27 | FromDiscord | <Illusive> i am currently trying to figure out how to use slash commands in dimscmd |
19:51:36 | * | Gustavo6046_ joined #nim |
19:52:19 | * | Gustavo6046 quit (Ping timeout: 252 seconds) |
19:54:41 | * | Gustavo6046_ is now known as Gustavo6046 |
20:00:10 | FromDiscord | <logo4poop> @Illusive https://github.com/ire4ever1190/dimscmd |
20:00:38 | FromDiscord | <Recruit_main707> so we eneded up shipping 1.6 with a broken nimble? |
20:01:16 | FromDiscord | <Illusive> i think i figured out the stuff |
20:01:19 | FromDiscord | <Illusive> with modules |
20:04:57 | FromDiscord | <Gumber> In reply to @Recruit_main707 "so we eneded up": I didn't ship anything! |
20:05:27 | FromDiscord | <Gumber> what is broken about it? I remember something was broken a couple / few weeks ago but I thought the release was delayed to address that ish |
20:06:55 | FromDiscord | <Recruit_main707> sent a code paste, see https://play.nim-lang.org/#ix=3CC3 |
20:07:34 | FromDiscord | <Gumber> that's not really a helpful stacktrace |
20:07:47 | FromDiscord | <Gumber> oh a fresh project hmmm? |
20:07:52 | FromDiscord | <Gumber> let me try to reproduce |
20:08:12 | FromDiscord | <Gumber> library or binary? |
20:08:16 | FromDiscord | <Gumber> or hybrid? |
20:08:27 | FromDiscord | <Recruit_main707> binary, but it also happens with `nimble install nimble` |
20:08:48 | FromDiscord | <Gumber> doesn't happen for me |
20:09:03 | FromDiscord | <Gumber> sent a code paste, see https://play.nim-lang.org/#ix=3CC4 |
20:09:46 | FromDiscord | <Gumber> sent a code paste, see https://play.nim-lang.org/#ix=3CC5 |
20:10:14 | FromDiscord | <Recruit_main707> same version as mine |
20:10:27 | FromDiscord | <Gumber> maybe you have multiple nim installs and conflicting stdlibs? |
20:10:29 | FromDiscord | <Gumber> I dunno... |
20:12:16 | FromDiscord | <Recruit_main707> that could be, lemme unsinstall completely the old version |
20:13:14 | FromDiscord | <Recruit_main707> no luck |
20:13:35 | FromDiscord | <Gumber> I dunno - I might just completely remove all Nim related artifacts from your machine and reinstall |
20:13:44 | FromDiscord | <Gumber> it definitely works for me but I don't know what OS you're on or CPU arch |
20:13:55 | FromDiscord | <Gumber> and I don't think it's an issue with nimble because I think more noise would be being made |
20:14:26 | Mister_Magister | no news yet |
20:14:38 | Mister_Magister | works so far |
20:19:37 | * | Vladar quit (Quit: Leaving) |
20:22:51 | FromDiscord | <Recruit_main707> deleting .nimble and then reinstalling seemed to do the trick |
20:36:39 | FromDiscord | <tandy> yep, had this problem the other day↵(@Recruit_main707) |
20:37:52 | FromDiscord | <tandy> dom said clear the folder in ur homedir |
21:01:05 | Mister_Magister | works since 2 hours |
21:01:09 | Mister_Magister | maybe devel fixed it |
21:17:26 | FromDiscord | <tandy> `cstrToNimstr` is there a way to use this on browser javascript? |
21:17:46 | FromDiscord | <Elegantbeef> doesnt `.string` work? |
21:17:58 | FromDiscord | <tandy> hmm il try , i was using `$` |
21:18:03 | FromDiscord | <Elegantbeef> or `string(yourStr)` |
21:19:20 | FromDiscord | <tandy> string() and .string dont work |
21:19:31 | FromDiscord | <tandy> only $ compiles, but when testing js errors out |
21:20:18 | FromDiscord | <tandy> another reason why we need typeunions in nim \:) |
21:20:36 | FromDiscord | <Elegantbeef> I dont see how that changes this |
21:21:19 | FromDiscord | <tandy> im converting from cstring to string because im using a "pure" type |
21:21:29 | FromDiscord | <tandy> like how the matrix-nim-sdk api works |
21:22:21 | * | Gustavo6046 quit (Read error: Connection reset by peer) |
21:24:50 | FromDiscord | <Elegantbeef> Well then i guess `$` or your own `toString` proc is best bet |
21:25:59 | FromDiscord | <tandy> hmm |
21:26:23 | FromDiscord | <tandy> il probably switch the pure types to use cstring |
21:26:33 | FromDiscord | <tandy> because nimstr to cstring works on the native backend |
21:32:34 | * | Gustavo6046 joined #nim |
21:40:07 | * | Gustavo6046 quit (Ping timeout: 252 seconds) |
21:43:50 | * | Gustavo6046 joined #nim |
21:58:58 | * | Jjp137 quit (Quit: Leaving) |
22:01:04 | * | Jjp137 joined #nim |
22:01:17 | * | Gustavo6046_ joined #nim |
22:01:22 | Mister_Magister | oh no i lied |
22:01:25 | Mister_Magister | devel didn't fix it |
22:01:49 | FromDiscord | <Elegantbeef> Where's your project? |
22:01:55 | FromDiscord | <Elegantbeef> You've been stuck on this bug too long |
22:01:56 | Mister_Magister | @Hamid stack trace is the same |
22:02:11 | * | Gustavo6046 quit (Ping timeout: 245 seconds) |
22:02:21 | Mister_Magister | me? |
22:02:35 | FromDiscord | <Elegantbeef> Yes |
22:02:56 | Mister_Magister | [19:16] <Mister_Magister> @Hamid Bluri https://paste.opensuse.org/ec036dcf |
22:03:05 | Mister_Magister | here |
22:04:07 | * | Gustavo6046_ is now known as Gustavo6046 |
22:08:51 | FromDiscord | <good_evening> Is there a list of commonly used libraries/modules for nim? |
22:09:27 | FromDiscord | <tandy> https://github.com/treeform↵(@good_evening) |
22:09:41 | FromDiscord | <good_evening> Thank you! |
22:13:13 | FromDiscord | <Elegantbeef> So it raises an uncatchable oserror? |
22:15:11 | Mister_Magister | well in this example im catching it but it doesn't recover, simple answer, yes tho its catchable |
22:17:42 | FromDiscord | <Elegantbeef> Have you tried it without async to see if it's anymore helpful? |
22:18:13 | Mister_Magister | i did not |
22:19:00 | FromDiscord | <Elegantbeef> I havent used async much(if at all) so i dont know what else to say 😀 |
22:20:10 | Mister_Magister | i started using async recently its glorious |
22:20:32 | FromDiscord | <Elegantbeef> I dont write code that benefits from async |
22:20:41 | Mister_Magister | i see |
22:21:04 | FromDiscord | <Yardanico> In reply to @good_evening "Is there a list": not that I know of, treeform is just a guy who makes a lot of good libs so tandy linked him :P |
22:21:09 | FromDiscord | <Yardanico> you can find quite a lot of good libs in https://github.com/nim-lang/Nim/wiki/Curated-Packages |
22:21:22 | FromDiscord | <Elegantbeef> There is also just the nimble package registry |
22:22:10 | FromDiscord | <Yardanico> yes, if you know what you're searching for |
22:22:11 | FromDiscord | <Yardanico> http://nimble.directory/ |
22:24:42 | Mister_Magister | ill try fixing all my requests to it maybe that will help |
22:24:51 | Mister_Magister | tho just crashing without option of recovery is not very fun |
22:26:01 | FromDiscord | <tandy> this↵(@Yardanico) |
22:26:16 | FromDiscord | <Yardanico> tandy, but only linking treeform is a bit misleading anyway :) |
22:43:54 | FromDiscord | <good_evening> In reply to @Yardanico "you can find quite": Thank you as well. |
22:50:35 | * | oprypin quit (Quit: Bye) |
22:50:55 | * | oprypin joined #nim |
22:54:52 | FromDiscord | <Schelz> is there any way i can get the pid of a process with only its name |
22:54:54 | FromDiscord | <Schelz> ? |
22:55:15 | Mister_Magister | pidof <name> |
22:55:28 | Mister_Magister | well in linux at least xd |
23:16:31 | FromDiscord | <rainbowasteroids> i typically just `ps | grep -i name`, lol |
23:40:48 | FromDiscord | <impbox [ftsf]> In reply to @Schelz "is there any way": There may be multiple processes with the same name |
23:41:08 | FromDiscord | <impbox [ftsf]> pgrep also works |
23:41:17 | FromDiscord | <impbox [ftsf]> No need for ps | grep |
23:46:02 | NimEventer | New thread by Ggibson: Macro to reconstitute const string to type?, see https://forum.nim-lang.org/t/8533 |