<< 11-06-2022 >>

00:04:29*krux02 quit (Remote host closed the connection)
00:07:47FromDiscord<Elegantbeef> I keep getting reminded i should make tests for my game 😄
00:08:44*sagax quit (Ping timeout: 255 seconds)
00:20:44*vicfred joined #nim
00:20:57FromDiscord<huantian> I thought the users just test it for you
00:21:11FromDiscord<Elegantbeef> Only works if you're AAA
00:30:32FromDiscord<Luckayla> How easy would you folks consider it for someone to get into contributing to the language directly, i.e assisting with gh issues to fix bugs/improve Nim as a language?
00:30:58FromDiscord<Elegantbeef> Given i've done it and i'm a fucking idiot, easy if you have time
00:54:05FromDiscord<Not Saucx> question
00:54:09FromDiscord<Not Saucx> What is "proc"?
00:54:26FromDiscord<Not Saucx> im assuming it defines the functions or something?
00:56:23FromDiscord<!Patitotective> procedures↵because functions dont have side effects but procedures can
01:09:00FromDiscord<huantian> yeah it's the same as `def` in python or `fn` in rust
01:31:19FromDiscord<sOkam!> sent a long message, see http://ix.io/3ZSW
01:31:24*xaltsc quit (Quit: WeeChat 3.5)
01:33:16FromDiscord<Generic> I think this is only there because originally quake would run with x87 floating point where division by zero generates an exception
01:33:34FromDiscord<Generic> or can generate an exception
01:36:23*kayabaNerve quit (Ping timeout: 244 seconds)
01:36:29FromDiscord<Generic> ok sse seems to be eable to generate exceptions too
01:36:59FromDiscord<Generic> though I think they're pretty much always disabled
01:40:24FromDiscord<sOkam!> In reply to @Generic "I think this is": i see, makes sense. tyty
01:44:34FromDiscord<konsumlamm> (to be clear, division by zero generates a CPU exception, which is different from an exception on the programming language level)
01:45:12FromDiscord<sOkam!> How can I get which operating system its running the compiler or code?
01:47:01FromDiscord<sOkam!> (edit) "How can I get which operating system its running the compiler or code?" => "sent a code paste, see https://play.nim-lang.org/#ix=3ZSZ"
01:48:40FromDiscord<Elegantbeef> `const isLinux = defined(linux)`
01:49:18FromDiscord<sOkam!> how about the other systems? how can I know what other values are predefined like that one?
01:49:34FromDiscord<sOkam!> i was looking for it in the manual, but I can't seem to find it
01:49:42FromDiscord<konsumlamm> i was about to suggest `when defined(linux): true else: false`, thank god you were first beef
01:50:08FromDiscord<konsumlamm> there doesn't seems to be generic mechanism to detect the OS
01:50:11FromDiscord<Elegantbeef> They're defines they're not set anything
01:50:42FromDiscord<sOkam!> what does that mean?
01:50:50FromDiscord<konsumlamm> `std/distros` provides `detectOs(someCandidate)`, but you'd still have to test every possibility
01:51:28FromDiscord<konsumlamm> what's your use case though? ideally you'd just do the same on every platform
01:51:56FromDiscord<sOkam!> porting a preexisting app that has a crap ton of system checks 😔
01:52:17FromDiscord<sOkam!> but that's a good point, though
01:53:22*kayabaNerve joined #nim
01:54:14FromDiscord<sOkam!> so, if I put some code behind a define, and I don't pass that in the compiler command as an argument, the code would not exist?
01:55:09FromDiscord<sOkam!> basically trying to understand what `defined(val)` does, and how it's expected to be used
01:56:05FromDiscord<konsumlamm> `defined(val)` gives you a compile-time value that's `true` if `val` is defined and `false` if it isn't defined
01:56:30FromDiscord<konsumlamm> if you have a `when defined(val):` block, the code is only compiled when `val` is defiend
01:56:34FromDiscord<konsumlamm> (edit) "defiend" => "defined"
01:57:04FromDiscord<sOkam!> ye, but how is the value defined?↵is it possible to use standard variables, or are they expected to be passed as arguments to the compiler?
01:57:16FromDiscord<Elegantbeef> They're defined in a config
01:58:59FromDiscord<konsumlamm> that or via the command line (`--define:foo`)
02:01:38*kayabaNerve quit (Remote host closed the connection)
02:02:03*kayabaNerve joined #nim
02:02:38*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
02:09:50*kayabaNerve quit (Ping timeout: 240 seconds)
02:13:02*kayabaNerve joined #nim
02:21:10*kayabaNerve quit (Ping timeout: 240 seconds)
02:22:17*kayabaNerve joined #nim
02:22:30*kayabaNerve quit (Remote host closed the connection)
02:47:34FromDiscord<nwilburn> apologies for my confusion here, but shouldn't I be able to pass in a `seq[byte]` to a proc with a signature of `openArray[byte]`?
02:48:13FromDiscord<huantian> you should
02:49:02FromDiscord<Elegantbeef> Likely you either are missing a mutable sequence
02:50:00FromDiscord<nwilburn> am I misreading this? https://media.discordapp.net/attachments/371759389889003532/985012999951622194/unknown.png
02:50:19FromDiscord<Elegantbeef> Nope you've ran into a "bug"
02:50:33FromDiscord<Elegantbeef> It's not technically a bug but I consider it one
02:50:51FromDiscord<Elegantbeef> you can do `mySeq.toOpenArray(0, mySeq.high)`
02:51:37FromDiscord<nwilburn> yea thats what I've been doing as a workaround but it seemed a bit dirty. What is causing this?
02:51:45FromDiscord<Elegantbeef> the generic `add`
02:52:50FromDiscord<Elegantbeef> Nim doesnt convert to generics implicitly so `openArray[byte] | string` doesnt it should be written `proc add[T: byte or char](sha: Sha1, oa: openarray[T]`
02:54:30FromDiscord<nwilburn> ah interesting. thanks for the info!
02:55:21FromDiscord<Zectbumo> In reply to @Luckayla "How easy would you": very easy. I just started learning nim weeks ago and I already contributed
02:55:33FromDiscord<sOkam!> How can I safely convert a nim string into a cstring?
02:56:00FromDiscord<Zectbumo> is that assuming there an unsafe way?
02:56:29FromDiscord<huantian> `"string".csting`
02:56:31FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=
02:56:46FromDiscord<huantian> or any other UCFed way
02:57:55FromDiscord<Zectbumo> sent a code paste, see https://play.nim-lang.org/#ix=3ZT9
02:58:39*arkurious quit (Quit: Leaving)
03:05:29FromDiscord<sOkam!> kk 👌
03:14:33FromDiscord<Luckayla> In reply to @Zectbumo "very easy. I just": awesome to hear... I think I will try getting into contribution once I get more familiar with the language.
03:17:43FromDiscord<Elegantbeef> Both are unsafe 😄↵(@Zectbumo)
03:19:52FromDiscord<Zectbumo> I think we need to define "unsafe". I took @sOkam! asking about the conversion process. Converting it is safe. Then there is the unsafe handling of this data.
03:20:19FromDiscord<Zectbumo> or am I wrong in thinking this
03:20:34FromDiscord<Elegantbeef> Well the unsafe part isnt the conversion
03:20:39FromDiscord<Elegantbeef> Taking a pointer is always "safe"
03:31:36FromDiscord<Zectbumo> In reply to @Luckayla "awesome to hear... I": do you want an easy fix?
03:32:17FromDiscord<Luckayla> At the moment no
03:32:26FromDiscord<Luckayla> thanks though^^
03:33:13FromDiscord<Zectbumo> 😄 okay. I'll fix it but for fun I'm going to throw it out there.↵Find the missing `$`↵https://github.com/nim-lang/Nim/blob/devel/bin/nim-gdb
03:35:07FromDiscord<Zectbumo> only 25 line file (mostly comments and whitespace)
03:35:45FromDiscord<Luckayla> line 10 after the OR operator the second uname -s block
03:35:51FromDiscord<Luckayla> that's not gonna execute :^)
03:47:24FromDiscord<proton> sent a code paste, see https://paste.rs/q6G
03:49:08FromDiscord<huantian> don't compile with `-d:release`?
03:49:42FromDiscord<huantian> you can also do `--stackTrace:on`
03:53:57FromDiscord<proton> ok, thanks
03:56:55FromDiscord<sOkam!> Does futhark not support variable resolution inside `importc:` blocks? 🤔
03:58:59FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=3ZTf
04:00:53FromDiscord<sOkam!> (edit) "https://play.nim-lang.org/#ix=3ZTi" => "https://paste.rs/ChE"
04:09:48*wallabra_ joined #nim
04:10:42*wallabra quit (Ping timeout: 260 seconds)
04:10:47*wallabra_ is now known as wallabra
04:24:33FromDiscord<sOkam!> Also, is there a way to setup search paths for global futhark include folders?↵Its not being able to find many of the `<std.h>` headers _(stddef.h is one of them)_
04:29:39*vicecea quit (Remote host closed the connection)
04:30:10*vicecea joined #nim
04:30:22FromDiscord<huantian> isn't that what sysPatha nd path are for?
04:30:35FromDiscord<Elegantbeef> yea syspath is like `-I`
04:30:50FromDiscord<sOkam!> sent a code paste, see https://paste.rs/Qx2
04:31:08FromDiscord<Elegantbeef> You use `sysPath`
04:32:10FromDiscord<sOkam!> ah. the documentation inside the file is outdated :pepehands:
04:38:21FromDiscord<sOkam!> `sysPath` wroked. zenks 👌↵↵Having to maintain the syspath folder for each version of the gcc libs sounds kinda silly though, when it could be resolved to the latest version on compile↵Do you know anything about the variable resolution issue inside importc: blocks?
04:47:22FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=3ZTk
04:56:55FromDiscord<Luckayla> is it idiomatic in nim to run a short application entirely in a `when isMainModule` block or still use a `proc main` to execute inside of isMainModule?
04:57:08FromDiscord<Elegantbeef> That's between you and your god
05:04:23FromDiscord<sOkam!> sent a code paste, see https://paste.rs/8JF
05:05:14FromDiscord<Elegantbeef> `one, three`
05:16:19FromDiscord<sOkam!> How does one access the value contained in a `nnkIdent` node?↵Seems like `strVal` is getting the identifier name itself, instead of the content
05:16:43FromDiscord<Elegantbeef> Idents dont have values
05:20:13FromDiscord<sOkam!> how do you access the value an identifier points to?
05:20:46FromDiscord<Elegantbeef> Idents dont point to values
05:20:54FromDiscord<Elegantbeef> Idents are not semantically checked names
05:22:12FromDiscord<sOkam!> ok, how do you access the value stored in a variable when that variable is passed to a macro?
05:22:24FromDiscord<Elegantbeef> take in a `typed` macro
05:22:35FromDiscord<Elegantbeef> or `static T`
05:22:35FromDiscord<sOkam!> ?
05:23:01FromDiscord<Elegantbeef> macros that type untyped AST cannot access anything that AST will point to
05:23:08FromDiscord<Elegantbeef> Untyped ast is not compiled
05:23:55FromDiscord<sOkam!> would it be possible to write a macro that resolves into the correct string literals that futhark wants for its importc macro?
05:24:17FromDiscord<Elegantbeef> It can take strings
05:24:27FromDiscord<sOkam!> but not variables!!
05:24:41FromDiscord<sOkam!> i want it to take variables that contain strings, not string literals themselves
05:24:42FromDiscord<Elegantbeef> Yea it can
05:24:47FromDiscord<sOkam!> it doesn't
05:24:56FromDiscord<Elegantbeef> https://github.com/beef331/wasmedge_playground/blob/master/src/wasmedge.nim#L35
05:25:01FromDiscord<Elegantbeef> It does too
05:25:49FromDiscord<sOkam!> In reply to @Elegantbeef "https://github.com/beef331/wasmedge_playground/blob": https://github.com/beef331/wasmedge_playground/blob/df4131603ff69c0371785fe25f85da10c0b83ea5/src/wasmedge.nim#L37 thats a literal
05:25:59FromDiscord<sOkam!> if i put a variable there, it errors
05:26:01FromDiscord<Elegantbeef> That's not a literal
05:26:28FromDiscord<sOkam!> how is l37 not a literal?
05:26:34FromDiscord<Elegantbeef> Oh your import files, those should be the C import file so yea idk
05:27:35FromDiscord<sOkam!> is it possible to write a macro that resolves into another macro?
05:27:45FromDiscord<Elegantbeef> No
05:28:40FromDiscord<Rika> Kinda but it’s fucky so effectively no
05:28:47FromDiscord<sOkam!> then back to square1. how do you access the value of a variable that contains a string literal, from within a macro, when passed the variable instead?
05:29:06FromDiscord<Rika> You cannot if the macro is untyped
05:29:08FromDiscord<sOkam!> (edit) "instead?" => "instead of the value?"
05:29:09FromDiscord<Elegantbeef> You cant inside an untype AST
05:29:48FromDiscord<sOkam!> 😔
05:33:38*rockcavera quit (Remote host closed the connection)
05:34:02*vicfred quit (Quit: Leaving)
06:14:10FromDiscord<sOkam!> sent a code paste, see https://paste.rs/OWa
06:15:29FromDiscord<Elegantbeef> `$c`
06:15:51FromDiscord<sOkam!> so simple 😦
06:17:04*kayabaNerve joined #nim
06:18:23FromDiscord<Elegantbeef> Or you could just do `key.len > 0 and key[0] == c`
06:18:58FromDiscord<Elegantbeef> Though dont think you can get empty strings
06:29:25*pro joined #nim
06:37:43*kenran joined #nim
06:51:17NimEventerNew thread by Cmc: Idea: Marketing Nim to Organizations, see https://forum.nim-lang.org/t/9223
07:08:43*pro quit (Ping timeout: 246 seconds)
07:22:54FromDiscord<ripluke> How can I use regex to check strings in nim? Is there a package
07:23:35FromDiscord<Yardanico> In reply to @ripluke "How can I use": std/re if you don't mind having to depend on PCRE, or `regex` in Nimble if you need pure-nim
07:23:36*wallabra quit (Quit: ZNC 1.8.2 - https://znc.in)
07:23:39FromDiscord<Elegantbeef> there are `nre` and `re` in the stdlib which use pcre and a pure nim version on nimble
07:23:45FromDiscord<Yardanico> also, in quite a lot of cases you can do stuff without regex
07:24:03FromDiscord<ripluke> In reply to @Yardanico "std/re if you don't": Ok I'll check it out
07:24:23FromDiscord<ripluke> In reply to @Yardanico "also, in quite a": That's the way my code is rn, it works but it's needlessly verbose
07:24:54FromDiscord<Elegantbeef> What's the code?
07:24:58FromDiscord<Elegantbeef> Regex is the devil imo
07:25:33FromDiscord<Elegantbeef> Unless you're searching for strings you're using it wrong, is what i generally think
07:26:37FromDiscord<ripluke> In reply to @Elegantbeef "Unless you're searching for": So basically when I was learning Nim I made a really bad password validator, which im trying to improve with regex
07:26:54FromDiscord<Yardanico> I think it's much easier to validate with normal Nim code, and it'll be much easier to understand as well
07:27:02FromDiscord<Elegantbeef> That's exactly what you dont us regex for
07:27:17FromDiscord<Yardanico> @ripluke do you know what nim sets are?
07:27:19FromDiscord<Yardanico> the built-in ones
07:27:25FromDiscord<ripluke> In reply to @Yardanico "<@704106773660827690> do you know": Yea
07:27:26FromDiscord<Yardanico> and that strutils has a lot of helper procs so you can use them on strings
07:27:41FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/kdh
07:28:29FromDiscord<ripluke> sent a code paste, see https://paste.rs/BlI
07:28:30*kayabaNerve quit (Ping timeout: 276 seconds)
07:28:46FromDiscord<ripluke> And it also works with numbers?
07:28:52FromDiscord<Yardanico> numbers are chars
07:28:54FromDiscord<Yardanico> so of course
07:29:08FromDiscord<Yardanico> it doesn't work with Unicode chars though, as Nim chars are ASCII ones
07:29:28FromDiscord<Elegantbeef> its not unicode aware but passwords generally arent
07:29:55FromDiscord<ripluke> In reply to @Yardanico "it doesn't work with": Yea
07:30:27*ltriant quit (Ping timeout: 276 seconds)
07:33:28*kenran quit (Quit: WeeChat info:version)
08:11:44FromDiscord<demotomohiro> Why random unicode charactors cannot be used for passwords?
08:12:06FromDiscord<Elegantbeef> Cause unicode is a myth
08:12:30FromDiscord<Elegantbeef> Joke aside people just want hackable passwords apparently
08:13:37FromDiscord<Elegantbeef> Some places put some weird restrictions on passwords so it's like they want people to be hacked
08:14:16FromDiscord<demotomohiro> Is it something like SQL injection?
08:14:51FromDiscord<Elegantbeef> No remember passwords never should travel in the air as raw text
08:14:52*noeontheend joined #nim
08:15:10FromDiscord<Elegantbeef> So whether a password has unicode should not change it's validity that i know of
08:18:13FromDiscord<Rika> personally i wouldnt validate passwords by "whether it has these characters or not"
08:18:18FromDiscord<Rika> but by length and dictionary testing
08:18:51FromDiscord<Elegantbeef> Yea that's the way
08:19:06FromDiscord<Elegantbeef> Ensure it's not a common password and ensure it's a safe length
08:19:15FromDiscord<Rika> but also personally if i could i'd enforce webauthn lmao
08:20:09FromDiscord<Elegantbeef> Yea that's a way
08:20:35FromDiscord<demotomohiro> That makes sense
08:21:36FromDiscord<Elegantbeef> I think the reason that passwords are checked for specific characters is to ensure it's capable of being typed on a NA keyboard, but it's just a fucking joke purposely making them less secure
08:22:15FromDiscord<Elegantbeef> It's much like email in that you dont check if an email is valid with regex 😄
08:24:17FromDiscord<Rika> i mean yeah i think unicode on passwords is kinda fucked (what if you're on a different language pc?) but there are other ways to ensure that ig
08:24:21FromDiscord<Elegantbeef> Hell the only reason length limits make sense is to reduce hash collision
08:24:43FromDiscord<Elegantbeef> Sure but i mean rika if the user wants it to be their password what's the reason to prevent it 😄
08:25:07FromDiscord<Rika> well theres gotta be some minimum level of dumbass protection
08:25:17FromDiscord<Rika> otherwise you'd be locked out of your account, beef
08:25:43FromDiscord<Elegantbeef> "We've detected you're about to use characters which may be difficult to type, are you sure you want that password?!"
08:25:51FromDiscord<Rika> thats a good way
08:26:02FromDiscord<Elegantbeef> I mean how do you accidently type unicode passwords twice
08:26:28FromDiscord<Rika> well i mean dumbasses that want a unicode password, not dumbasses that accidentally use unicode
08:26:36FromDiscord<Rika> <-- im one of them :baqua:
08:27:12FromDiscord<demotomohiro> People using password manager dont need to care whether charactors in password can be typed.
08:27:25FromDiscord<Elegantbeef> Tell me about it
08:27:44FromDiscord<Elegantbeef> I dont even know my passwords
08:27:56FromDiscord<Elegantbeef> Life is good
08:28:02FromDiscord<Rika> In reply to @Elegantbeef "I dont even know": me
08:28:40FromDiscord<Rika> i remember having 72 char extended ascii passwords, i think ive decommissioned them all nowadays
08:29:53FromDiscord<Elegantbeef> I tend to live by "You can try to make an idiot proof system, but then the universe just makes a smarter idiot"
08:30:58*jmdaemon quit (Ping timeout: 246 seconds)
08:35:26*mahlon quit (Ping timeout: 255 seconds)
08:59:20*ltriant joined #nim
09:17:45*noeontheend quit (Ping timeout: 256 seconds)
09:19:27*jjido joined #nim
10:03:45*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
10:08:30FromDiscord<Phil> If I wanted to bake my software into a docker container... is the correct way to compiled binary into the container or to compile the binary in the container?
10:08:37FromDiscord<Phil> (edit) "If I wanted to bake my software into a docker container... is the correct way to ... compiled" added "copy the"
10:11:02FromDiscord<Phil> So far I found the answer to be "yeah compile in container, but have a second image that takes the binary that was compiled to build a second container with all the same dependencies, but now without the source-code to keep it light
10:11:21FromDiscord<Phil> Mostly wanted to ask what the opinion on here was since I have little experience in setting stuff like this up
10:11:38FromDiscord<Rika> #offtopic ?
10:11:47FromDiscord<Rika> is this offtopic
10:11:49FromDiscord<Rika> i dont know
10:11:53FromDiscord<Rika> half half?
10:12:05FromDiscord<Phil> I wasn't sure if that counts since it's about how to handle nim code and its distribution
10:12:24FromDiscord<Phil> I guess it's not questions about nim specifically though
10:13:00*krux02 joined #nim
10:20:18*jjido joined #nim
10:35:15*def- quit (Quit: -)
10:35:27*def- joined #nim
11:18:08*pro joined #nim
11:23:01FromDiscord<amadan> @Phil think you're looking for this https://docs.docker.com/develop/develop-images/multistage-build/ ?↵Basically you have a build step to build the nim binary which then gets copied into the final image.↵Seems like good idea imo since means both build and running is containerised (Though I've never done this in practice so take my opinion with a grain of salt)
11:48:46*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
12:03:11*PMunch joined #nim
12:21:05*krux02 quit (Remote host closed the connection)
12:30:32dv^_^is there anything like python's black for nim?
12:36:18FromDiscord<Yardanico> maybe you can describe what that is?
12:36:39FromDiscord<Rika> formatter
12:36:39FromDiscord<Yardanico> ah, code formatter, no, the closest we have is nimpretty, but it's not very stable or finished
13:02:10FromDiscord<capocasa> sent a code paste, see https://play.nim-lang.org/#ix=3ZU7
13:03:43FromDiscord<capocasa> (edit) "https://play.nim-lang.org/#ix=3ZU7" => "https://paste.rs/gvA"
13:04:01FromDiscord<capocasa> (edit) "https://play.nim-lang.org/#ix=3ZU9" => "https://paste.rs/PRc"
13:09:19*xaltsc joined #nim
13:18:24*arkurious joined #nim
13:21:19*TakinOver joined #nim
13:25:21FromDiscord<Phil> In reply to @amadan "<@180601887916163073> think you're looking": hmmm nice
13:35:06*pro quit (Ping timeout: 276 seconds)
13:35:30*pro joined #nim
14:07:13*jjido joined #nim
14:15:25FromDiscord<Yardanico> In reply to @capocasa "Is there any way": You have to use refs instead
14:15:33FromDiscord<Yardanico> Or FutureVar but I haven't used that myself
14:16:02FromDiscord<capocasa> In reply to @Yardanico "You have to use": Just found it- thanks!
14:16:37FromDiscord<capocasa> In reply to @Yardanico "Or FutureVar but I": Cool I'll look into that
14:19:57*wallabra joined #nim
14:22:36FromDiscord<capocasa> In reply to @capocasa "Cool I'll look into": Looks like FutureVar lacks the sugar Future has like `await` and `proc {.async.}`. I used it on its own before as a timer, works as expected. So refs it is.
14:24:04*rockcavera joined #nim
14:24:05*rockcavera quit (Changing host)
14:24:05*rockcavera joined #nim
14:29:06*wallabra quit (Quit: ZNC 1.8.2 - https://znc.in)
14:29:15*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
14:29:22*wallabra joined #nim
14:33:59*pro quit (Quit: pro)
14:49:02*noxnivi joined #nim
15:01:57*wallabra quit (Quit: ZNC 1.8.2 - https://znc.in)
15:03:25*wallabra joined #nim
15:36:55NimEventerNew thread by Morturo: Could not load: lua(|5.1|5.0).dll, see https://forum.nim-lang.org/t/9224
15:44:39*ehmry quit (Quit: No Ping reply in 180 seconds.)
15:45:24*ehmry joined #nim
15:53:45*jjido joined #nim
15:57:07*lumidify quit (Quit: leaving)
16:07:51*pro joined #nim
16:13:48*pro quit (Quit: pro)
16:14:49*vicecea quit (Remote host closed the connection)
16:15:20*vicecea joined #nim
16:23:31*lumidify joined #nim
16:44:24*noxnivi quit (Quit: Leaving)
16:52:57FromDiscord<Max [codingreaction]> sent a code paste, see https://play.nim-lang.org/#ix=3ZV4
16:53:52FromDiscord<Yardanico> no, templates are just code substitution, you need to use macros for what you want to do
16:54:03FromDiscord<Yardanico> with macros doing the thing you want is easy, yes
16:57:18FromDiscord<Max [codingreaction]> In reply to @Yardanico "no, templates are just": roger, thanks Yardanico you saved me a lot of investigation time 🙂
17:11:54*pro joined #nim
17:12:05*pro quit (Client Quit)
17:17:58*kayabaNerve joined #nim
17:23:22*kayabaNerve quit (Ping timeout: 250 seconds)
17:27:29*pro joined #nim
17:28:04*pro quit (Client Quit)
17:31:06*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
17:31:20FromDiscord<retkid> https://media.discordapp.net/attachments/371759389889003532/985234791278460938/unknown.png
17:31:24FromDiscord<retkid> why are we so cursed
17:31:59FromDiscord<Yardanico> ?
17:32:26FromDiscord<Yardanico> the author wanted to name his repo this way and he did, I don't see what you mean
17:32:55FromDiscord<hyperreal> Is there a solution to the openssl problem? i.e. nim using openssl1 instead of 3. I can't run binaries on my Fedora system unless I install openssl1.1-devel, which is suboptimal. Is it possible to get Nim to use the latest openssl?
17:34:04FromDiscord<Yardanico> In reply to @hyperreal "Is there a solution": there is an open PR
17:34:12FromDiscord<Yardanico> you can apply it locally, it won't require rebuilding the compiler
17:35:21PMunchWell this looks like a bug http://ix.io/3ZVg
17:36:30*pro joined #nim
17:37:44FromDiscord<hyperreal> In reply to @Yardanico "you can apply it": how do I apply locally?
17:38:04FromDiscord<Yardanico> the easiest is to just literally edit the code to be the same as in the PR
17:38:15FromDiscord<Yardanico> https://github.com/nim-lang/Nim/pull/19814
17:38:30FromDiscord<Yardanico> you can also try `git apply` with https://patch-diff.githubusercontent.com/raw/nim-lang/Nim/pull/19814.diff
17:38:35FromDiscord<hyperreal> Ah, thanks!
17:38:35PMunchtreeform, you around?
17:41:37*jjido joined #nim
17:47:41FromDiscord<treeform> In reply to @PMunch "<@107140179025735680>, you around?": In spirit
17:48:14PMunchI was just wondering if you'd want something like this in Chroma: http://ix.io/3ZVj
17:48:23PMunchTurns a colour temperature into a colour
17:49:33FromDiscord<treeform> I get error from that page
17:51:11FromDiscord<treeform> Can temperature be color? I thought every atom had its own spectral lines?
17:51:40FromDiscord<treeform> Color of iron or hydrogen at some k?
17:53:36FromDiscord<treeform> Or is it color temperature from photography?
17:53:55FromDiscord<treeform> I got the page to load
17:54:02PMunch@treeform, https://en.wikipedia.org/wiki/Color_temperature
17:54:13PMunchIt's the emission colour of a black-body
17:54:40PMunchIt's commonly used for describing warm and cold lightbulbs
17:55:17PMunchI needed this function (and went to Chroma to find it) because I needed to get a colour temperature as XY coordinates to send to some IKEA smart bulbs to set their temperature
17:56:39*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
17:56:40FromDiscord<treeform> Sure let's add that into Chroma
17:57:04FromDiscord<treeform> Just not sure what the api should be
17:58:09PMunchWell it's basically just temperature -> color
17:58:31FromDiscord<treeform> Can you do color to temperature?
17:58:47PMunchNot really
17:59:07FromDiscord<treeform> Ok
17:59:13PMunchAs you can see from the Wikipedia article I sent you get a line through the XY colour spectrum
17:59:22PMunchSo if the colour lies on that line, sure
17:59:29FromDiscord<treeform> Make a PR I'll approve
18:00:01PMunchI guess it would also be possible to calculate a tangent to the line and map colours to that, but notsure how useful that would be
18:01:24PMunchWhere do you want me to put it?
18:52:47*Guest2637 joined #nim
18:53:14*Guest2637 left #nim (#nim)
18:54:48FromDiscord<Max [codingreaction]> In reply to @hyperreal "Is there a solution": omg i'd the same problem on ubuntu yesterday, it was paintfull as fuck but managed to resolve it with a link provided by the OP of the issue in the nimble github project plus some random jump around on stack overflow. Hope you have better luck my pal U_U
18:55:56FromDiscord<Max [codingreaction]> QUESTION: is StmtList an acronym for "Statements List"? (related to nim macros)
19:06:21FromDiscord<Phil> Sadly I know too little about macros to be of help here
19:08:17FromDiscord<Max [codingreaction]> In reply to @Isofruit "Sadly I know too": thanks, np Phil.
19:10:25FromDiscord<Max [codingreaction]> probably at certain point i may need to check to source code of the dumpTree macro to understand more about the representation that prints, because when you dump a function there are some "Empty" lines that aren't parameters, probably something reserved for generic types or varargs
19:10:43FromDiscord<Max [codingreaction]> but dunno 🤷
19:11:30FromDiscord<Max [codingreaction]> https://media.discordapp.net/attachments/371759389889003532/985260002539347988/unknown.png
19:12:06FromDiscord<Max [codingreaction]> 🤦‍♂️ the answer of my first question one page bellow haha, damn anxiety
19:22:15*pro quit (Quit: pro)
19:22:35*pro joined #nim
19:23:25*pro quit (Client Quit)
19:30:13FromDiscord<hyperreal> In reply to @Yardanico "you can also try": Tried this but some reason I still get SSL error
19:30:26FromDiscord<Yardanico> when doing what?
19:30:30FromDiscord<planetis> there are more information in https://nim-lang.github.io/Nim/macros.html#the-ast-in-nim
19:30:37FromDiscord<Yardanico> if you try to launch nimble, it'll fail, because you have to rebuild it
19:30:49FromDiscord<Yardanico> because nimble uses nim's standard library SSL stuff
19:30:58FromDiscord<hyperreal> I cloned the Nim repo, applied the patch, then ran build_all.sh
19:31:23FromDiscord<Yardanico> yes
19:31:24FromDiscord<hyperreal> and the nim binary in bin/ still gives the error
19:31:33FromDiscord<Yardanico> do you mean nimble?
19:31:40FromDiscord<Yardanico> you still have to specify the older ssl versions to build with it with that PR
19:31:43FromDiscord<Yardanico> (edit) "versions" => "version"
19:31:45FromDiscord<Yardanico> via a compile time flag
19:32:08FromDiscord<Yardanico> `-d:sslVersion=3`
19:32:08*pro joined #nim
19:32:09FromDiscord<hyperreal> no, just nim. I want to be able to compile nim programs that use openssl 3
19:32:18FromDiscord<Yardanico> nim doesn't matter
19:32:24FromDiscord<Yardanico> `nim` the compiler doesn't use SSL at all
19:32:36FromDiscord<Yardanico> do you mean your programs still error? then you need to compile them with `-d:sslVersion=3` flag
19:32:45FromDiscord<hyperreal> ohh I see, okay thanks
19:38:46FromDiscord<hyperreal> it still doesn't work for some reason
19:39:09FromDiscord<hyperreal> I compile my program with `nim c -d:ssl -d:sslVersion=3`
19:50:14FromDiscord<hyperreal> @Yardanico I'm a bit confused now :/
19:50:29FromDiscord<Yardanico> are you sure that `nim` is the Nim you manually compiled?
19:50:37FromDiscord<Yardanico> and not the one you installed before?
19:50:43FromDiscord<hyperreal> yes
19:54:17FromDiscord<hyperreal> sent a long message, see http://ix.io/3ZVI
19:55:07FromDiscord<Yardanico> hmm, but it's probably still using your normal nim's stdlib distribution?
19:55:11FromDiscord<Yardanico> not the cloned one
19:55:19FromDiscord<Yardanico> since you copied the binaries
19:55:21FromDiscord<Yardanico> only
19:56:16FromDiscord<hyperreal> oh, no I also copied the lib/ directory to ~/.local/lib
19:56:36*PMunch quit (Quit: leaving)
19:58:09FromDiscord<hyperreal> how do I fully install it manually, there doesn't seem to be a makefile or anything.
19:58:12FromDiscord<hyperreal> ?
20:02:37FromDiscord<hyperreal> @Yardanico
20:02:52FromDiscord<Yardanico> sorry, I don't know then
20:02:57*mahlon joined #nim
20:06:01FromDiscord<hyperreal> okay, thanks for trying
20:07:37*noeontheend joined #nim
20:19:10*noeontheend quit (Ping timeout: 240 seconds)
20:25:46proI'm sending some data over raw UDP, I'd like to symetrically encrypt my payload, how should I do it ?
20:26:29proregarding serializing my json/payload/encrypting it
20:28:08*jjido joined #nim
20:30:03FromDiscord<dom96> @hyperreal you might want to try modifying the files you've patched with something that will definitely cause an error to make sure you are definitely running the right Nim install
20:35:40FromDiscord<geekrelief> has anyone had any luck with --genscript and vcc? I'm running the .bat file but getting an error like this: `cl : Command line error D8022 : cannot open 'mnimforue@sunreal@snimforue@snimforuebindings.nim.cpp'` for each cpp file. In the nimcache each of the cpp files start with `@`, but cl doesn't pick it up. I tried putting quotes around the file names but that didn't work.
20:36:03FromDiscord<geekrelief> (edit) "has anyone had any luck with --genscript and vcc? I'm running the .bat file but getting an error like this: `cl : Command line error D8022 : cannot open 'mnimforue@sunreal@snimforue@snimforuebindings.nim.cpp'` for each cpp file. In the nimcache each of the cpp files start with `@`, but cl doesn't pick it up. I tried putting ... quotes" added "double"
20:38:58*kayabaNerve joined #nim
20:49:28*noeontheend joined #nim
20:49:45NimEventerNew thread by Cnerd: Karax VNode.add question, see https://forum.nim-lang.org/t/9225
21:11:05FromDiscord<hyperreal> In reply to @dom96 "<@263927928595808257> you might want": yeah I mean, I'm sure it's something on my end. Using Fedora's openssl1.1-devel package is fine for now tho
21:15:46FromDiscord<Ayy Lmao> Does `typeof(foo)` evaluate foo at runtime or compiletime?
21:16:29FromDiscord<geekrelief> compiletime you can do `var a:typeof(1)`
21:16:51FromDiscord<Ayy Lmao> In reply to @geekrelief "compiletime you can do": Sweet, thanks!
21:17:55*pro quit (Quit: pro)
21:19:25FromDiscord<Rika> Types can’t actually change on run time
21:19:36FromDiscord<ambient> Nim project was recently on HN, kinda neat. What are some good projects you would recommend for reading and learning good Nim codebase?
21:19:59FromDiscord<ambient> something a bit more self contained preferable compared to stdlib
21:25:21FromDiscord<Ayy Lmao> In reply to @ambient "Nim project was recently": Treeform has some good projects. For example https://github.com/treeform/vmath
21:30:09FromDiscord<guzba> In reply to @Ayy Lmao "Treeform has some good": vmath is a heavy generics lib which might make it have a slight learning curve but there is a talk that can help: https://fosdem.org/2022/schedule/event/nim_metaprogramming/
22:08:56*rockcavera quit (Remote host closed the connection)
22:13:00*rockcavera joined #nim
22:13:01*rockcavera quit (Changing host)
22:13:01*rockcavera joined #nim
22:53:57*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
23:06:55FromDiscord<Zoom> Are there any code samples using `selectors.registerProcess`? I think I'm using it wrong. Getting `Resource temporarily unavailable (code: 11)` on `select()`
23:14:27*droidrage quit (Ping timeout: 240 seconds)
23:19:32FromDiscord<Elegantbeef> I've seen pretty much no one use selectors, so how are you using it Zoom?
23:21:45FromDiscord<Zoom> Just launch a bunch of processes, register them and query `select(-1)` in a loop. I tried to follow disruptek/golden/invoke.nim
23:22:13FromDiscord<Elegantbeef> Are you sure the processes havent exited by the time you attempt to select on them?
23:23:25FromDiscord<Elegantbeef> I've never used select really myself just guessing
23:24:04FromDiscord<Zoom> I'm not, but I'm launching a dummy which sleeps for at least 250ms
23:33:37*ltriant quit (Ping timeout: 246 seconds)
23:42:07FromDiscord<dom96> what is your high level goal Zoom?
23:42:21FromDiscord<dom96> maybe this would be helpful https://github.com/cheatfate/asynctools/blob/master/asynctools/asyncproc.nim
23:44:10FromDiscord<Zoom> Thanks for the link, but you could probably say one of the high level goals is not using asyncdispatch \:P
23:44:45FromDiscord<Zoom> Just trying to be minimalistic and understand how selectors work
23:45:16FromDiscord<dom96> asyncproc should be a good reference then
23:47:32FromDiscord<dom96> if you don't care about Windows and want more performance then using only selectors is a good strategy, it's how httpbeast does it
23:49:47FromDiscord<Zoom> BTW, if processes are unsupported on Win, why doesn't doc for registerProcess have the same note as registerSignal?↵(@dom96)
23:50:33FromDiscord<dom96> dunno
23:52:11ehmryanyone done real time audio synthesis is Nim? do we have anything for that?
23:52:48*ltriant joined #nim
23:55:58*noeontheend quit (Ping timeout: 250 seconds)