<< 21-05-2022 >>

00:00:04FromDiscord<retkid> https://media.discordapp.net/attachments/371759389889003532/977360090891964426/unknown.png
00:00:08FromDiscord<retkid> this doesn't scare you
00:00:11FromDiscord<Rika> it doesnt
00:00:16FromDiscord<Rika> you dont even need to use it directly
00:00:28FromDiscord<Rika> there are helpers where you dont touch a single node generating function
00:00:29FromDiscord<Elegantbeef> I'm the wrong person to ask
00:00:47FromDiscord<retkid> beef all you do is macro all day
00:00:55FromDiscord<retkid> you basically write lisp in nim
00:01:10FromDiscord<Elegantbeef> I havent wrote a macro in quite some time
00:01:15FromDiscord<Generic> ast is really not that much of a big deal
00:01:43*Guest95 quit (Quit: Client closed)
00:02:16*ltriant joined #nim
00:02:47FromDiscord<Generic> in the beginning the best thing is probably to just write some example code you want to be generated and print out the ast for it
00:02:50FromDiscord<retkid> I know this doesn't belong in nim but does sending data on an unlimited data line cost the company money
00:03:03FromDiscord<Rika> what?
00:03:11FromDiscord<retkid> like on a wireless mobile network
00:03:16FromDiscord<Rika> doing anything costs money for the company ofc?
00:03:58FromDiscord<retkid> so since my line is getting cancelled in a few days im gonna write some JS to stream random data to /dev/null on my computer
00:04:12FromDiscord<retkid> and download it from mine as well
00:04:14FromDiscord<Andreas> In reply to @Generic "in the beginning the": a little howto would be nice. And regarding templates - is there some chance to see the 'rendered'-template
00:04:26FromDiscord<Elegantbeef> Ah yes you're going to cost the company pennies
00:04:37FromDiscord<Elegantbeef> https://dev.to/beef331/demystification-of-macros-in-nim-13n8 here you go andreas
00:05:26FromDiscord<Rika> In reply to @Andreas "a little howto would": i think you can use --expandMacro:"templatename" on it but im not sure of that
00:05:32FromDiscord<Elegantbeef> You can
00:05:44FromDiscord<Elegantbeef> There is also the `std/macros` `expandMacro` macro
00:06:00FromDiscord<Generic> yeah I was about to bring that up
00:06:14FromDiscord<Generic> I only discovered it recently
00:06:24FromDiscord<Generic> otherwise I always used `echo result.repr`
00:07:11FromDiscord<Andreas> In reply to @Elegantbeef "https://dev.to/beef331/demystification-of-macros-in": nice, but i'm asking for a tool. Like one can 'dump' Nim-code to C and then inspect it. As a programmer i'm interested in the AST - nothing more and i wonder why none of the text-editors offers a way to let me inspect the resulting AST ? I once did a twin-view for Atom, just to see Code and AST side-by -side
00:07:14FromDiscord<retkid> guys if GO can be in GCC why cant nim be
00:07:23FromDiscord<retkid> we should contribute to GCC in nim
00:07:28FromDiscord<Elegantbeef> You dont want to dump the C code
00:07:51*ltriant quit (Ping timeout: 276 seconds)
00:07:57FromDiscord<Elegantbeef> I mean you can make tooling relatively easily https://streamable.com/c6farb
00:08:10FromDiscord<Andreas> In reply to @Elegantbeef "You dont want to": well, right, but at least i could, if i'm crazy enough..
00:08:23FromDiscord<retkid> In reply to @Andreas "nice, but i'm asking": this stuff exists and is frequently used by C and C++ "people"
00:08:27FromDiscord<Elegantbeef> I mean you can do \`--nimcache\:someFolder
00:08:52FromDiscord<Rika> the c code is not the "ast" either
00:08:58FromDiscord<Rika> kinda sounded like you equated them
00:09:01FromDiscord<Generic> I just go into userfolder/.nimcache/whateverprojectimworkingon
00:09:09FromDiscord<retkid> In reply to @Elegantbeef "I mean you can": is the AST not the asm?
00:09:12FromDiscord<Rika> no
00:09:14FromDiscord<Elegantbeef> No
00:09:20FromDiscord<Elegantbeef> AST is astract syntax tree
00:09:23FromDiscord<Elegantbeef> abstract\
00:09:28FromDiscord<Rika> astract
00:09:28FromDiscord<retkid> ah not the literal asm
00:09:30FromDiscord<Elegantbeef> It's what the compiler works on and reasons with
00:09:32FromDiscord<huantian> AST represents the structure of the Nim code so you can programmatically manipulate it
00:09:49FromDiscord<Elegantbeef> It's not even close to ASM
00:10:01FromDiscord<retkid> how much should i care about it
00:10:08FromDiscord<Elegantbeef> If you write macros a lot
00:10:21FromDiscord<Elegantbeef> Macros afterall take in AST and emit new AST
00:10:33FromDiscord<retkid> so thats how macros work
00:11:52FromDiscord<Andreas> In reply to @Elegantbeef "Macros afterall take in": that tool looks amazing - pretty new November.2021 - what editor is this ?
00:12:14FromDiscord<retkid> looks like...
00:12:19FromDiscord<retkid> code
00:12:20FromDiscord<retkid> ..
00:12:41FromDiscord<Elegantbeef> It's a small toy project for nimscripter
00:13:01FromDiscord<Elegantbeef> It's not actually usable or anything just a small example for nimscripter
00:13:14FromDiscord<Elegantbeef> https://github.com/beef331/nimscripter/tree/master/examples/macrorepl hosted here if interested
00:14:00FromDiscord<Andreas> In reply to @Elegantbeef "https://github.com/beef331/nimscripter/tree/master/": could one, integrate this into, say VS-Code or Atom ?
00:14:07FromDiscord<retkid> people use atom
00:14:31*jmdaemon joined #nim
00:14:35FromDiscord<retkid> probably something easier to do in inteliji
00:14:49FromDiscord<Zectbumo> I saw two add-ons for atom. Which is the good one? Nim2?
00:15:03FromDiscord<retkid> you use atom
00:15:09FromDiscord<retkid> is there any reason?
00:15:24FromDiscord<Elegantbeef> No clue
00:15:28FromDiscord<Zectbumo> No, but I thought I would because of the Nim plugin
00:16:14FromDiscord<retkid> YO ADOBE HAS AN IDE
00:17:45FromDiscord<retkid> check out brackets ide
00:17:58FromDiscord<Rika> isnt that deprecated
00:18:03FromDiscord<Rika> or unsupported
00:18:10FromDiscord<Rika> i believe they stopped dev of brackts
00:18:11FromDiscord<Rika> (edit) "brackts" => "brackets"
00:20:38FromDiscord<Andreas> @ElegantBeef just from the PR-side of things - such a tool, would enable people to make use of templates/macros. And i'd say such has not been done before - seriously - that would be a unique feature for Nim..
00:21:58FromDiscord<retkid> In reply to @Rika "i believe they stopped": they transferred it to the community to die
00:22:16FromDiscord<retkid> https://media.discordapp.net/attachments/371759389889003532/977365675016343593/unknown.png
00:22:20FromDiscord<retkid> its still going
00:22:21FromDiscord<Andreas> (edit) "Nim.." => "Nim..↵A playground on the website would prolly enough.."
00:22:23FromDiscord<Elegantbeef> "make use of templates/macros" you mean like they're presently used?
00:23:21FromDiscord<Andreas> In reply to @Elegantbeef ""make use of templates/macros"": like one can have a trial&error - experience as in the video.. interactive-computing 🙂
00:23:41FromDiscord<Andreas> (edit) "🙂" => "🙂↵exploring things..."
00:23:53FromDiscord<Elegantbeef> Well the NimVM can run in browser so have at 'er
00:24:10FromDiscord<retkid> In reply to @Elegantbeef "Well the NimVM can": that moment when you compile to JS
00:24:28FromDiscord<Elegantbeef> Nah the compiler doesnt run in browser
00:24:47FromDiscord<retkid> that moment when you say you can compile to JS but half the stdlib doesn't work
00:25:06FromDiscord<Elegantbeef> Stuff that should work generlally does
00:25:20FromDiscord<retkid> none of the cool things work tho
00:25:29FromDiscord<Elegantbeef> Like what?
00:25:38FromDiscord<Andreas> In reply to @Elegantbeef "Well the NimVM can": i'm interested in the visual-experience. Having a template on the left and a rendered piece-of-code on the right..
00:28:28FromDiscord<retkid> In reply to @Elegantbeef "Like what?": servers are the one that hurt the most
00:29:03FromDiscord<Elegantbeef> What?
00:29:21FromDiscord<Elegantbeef> I have 0 clue why you'd want to use Nim -\> JS for a backend
00:29:38FromDiscord<retkid> why not
00:29:47FromDiscord<huantian> Because JS is horrible
00:29:48FromDiscord<Elegantbeef> Cause it makes 0 fucking sense
00:30:00FromDiscord<retkid> In reply to @Elegantbeef "Cause it makes 0": why does that surprise you coming from me
00:30:06FromDiscord<Elegantbeef> Let's use a js runtime instead of running native
00:30:08FromDiscord<retkid> In reply to @huantian "Because JS is horrible": node is a good lang
00:30:12FromDiscord<Rika> then write node
00:30:14FromDiscord<Rika> what
00:30:19FromDiscord<retkid> nim is a better lang
00:30:23FromDiscord<Rika> then use nim natively
00:30:25FromDiscord<Rika> what
00:30:40FromDiscord<retkid> what if for some contrived reason i NEEDED js
00:30:51FromDiscord<huantian> What is your contrived reason
00:30:55FromDiscord<Elegantbeef> You use juan carlos' NodeJs library
00:31:16FromDiscord<retkid> say, i was like a 15 year old in a programming class
00:31:25FromDiscord<retkid> and my teacher wanted me to write a node js server
00:31:29FromDiscord<huantian> Then you write JS
00:31:33FromDiscord<huantian> Because that’s your assignment
00:31:39FromDiscord<Elegantbeef> Say there was a library that abstracted a lot of NodeJs for Nim
00:31:47FromDiscord<Elegantbeef> Shit would be cool if there was too bad there is
00:32:01*vicfred quit (Quit: Leaving)
00:32:16FromDiscord<retkid> https://media.discordapp.net/attachments/371759389889003532/977368194018856970/unknown.png
00:32:23FromDiscord<retkid> i didn't know he could code
00:32:34FromDiscord<Elegantbeef> https://github.com/juancarlospaco/nodejs
00:33:22FromDiscord<retkid> https://media.discordapp.net/attachments/371759389889003532/977368470427672656/unknown.png
00:33:24FromDiscord<retkid> this is cursed
00:33:43FromDiscord<Elegantbeef> Could be worse could be writing JS manually
00:33:49FromDiscord<retkid> no that image
00:35:51FromDiscord<retkid> there is no eample code
00:36:27FromDiscord<huantian> Did you like
00:36:38FromDiscord<huantian> Click on any of the doc links at the top of the reader
00:36:42FromDiscord<huantian> (edit) "reader" => "rear"
00:36:46FromDiscord<huantian> (edit) "rear" => "readme"
00:36:58FromDiscord<Elegantbeef> retkid doesnt read they just bitch 😄
00:37:13FromDiscord<retkid> i looked in the src
00:37:53FromDiscord<retkid> https://media.discordapp.net/attachments/371759389889003532/977369605444087888/unknown.png
00:38:41FromDiscord<retkid> In reply to @huantian "Click on any of": thats not example code thats just docs
00:39:15NimEventerNew Nimble package! odbcn - ODBC abstraction for Nim, see https://sr.ht/~mjaa/odbcn-nim/
00:41:14FromDiscord<huantian> https://media.discordapp.net/attachments/371759389889003532/977370449065431060/2022-05-20_17-40-35.mp4
00:41:48FromDiscord<Elegantbeef> I'll subtitle it for you huan
00:47:31FromDiscord<mr. glowinthedark> how do you force a proc argument to be a literal?
00:47:57FromDiscord<huantian> why do you need it to be a literal?
00:48:04FromDiscord<Elegantbeef> you can do `static T` or `T{lit}`
00:48:10FromDiscord<Elegantbeef> the first forces it to be known at compile time
00:48:14FromDiscord<Elegantbeef> The latter forces it to be a literal
00:48:41FromDiscord<Zectbumo> That's cool, can i see an example of that?
00:48:55FromDiscord<mr. glowinthedark> hmm, can you force a specific value in proc head?
00:48:57FromDiscord<Elegantbeef> I just showed an example
00:49:02FromDiscord<Elegantbeef> `T{lit}`
00:49:12FromDiscord<mr. glowinthedark> specific value for the literal
00:49:31FromDiscord<mr. glowinthedark> so I can have multiple procs, each for different literal value
00:49:55FromDiscord<Zectbumo> @mr. glowinthedark maybe you are looking for enum?
00:50:14FromDiscord<huantian> https://play.nim-lang.org/#ix=3YfM
00:50:19FromDiscord<mr. glowinthedark> don't worry, I know what I'm doing
00:51:13FromDiscord<Elegantbeef> You'd need to use static like huan showed
00:52:18FromDiscord<huantian> also just in case you want this, use `{.error: "compile time error message".}` if you need
00:53:41FromDiscord<Rika> Beans
00:55:04FromDiscord<huantian> https://cdn.discordapp.com/emojis/340218056934686732.webp?quality=lossless
00:55:16FromDiscord<huantian> dang I forgot things don't embed here I'lls end it anyways↵https://cdn.discordapp.com/emojis/340218056934686732.webp?quality=lossless
00:55:20FromDiscord<huantian> (edit) "I'lls end" => "I'll send"
00:56:54FromDiscord<Rika> I knew a dude who was nicknamed beans IRL
01:01:46FromDiscord<retkid> so
01:02:13FromDiscord<retkid> either 781454 living people have a wikipedia article
01:02:27FromDiscord<retkid> or nim is having trouble reading beyond 87092337874 bytes
01:02:55FromDiscord<retkid> no it seems I didn't write an end of file part in the while true
01:03:02FromDiscord<retkid> i forgot about that
01:15:42FromDiscord<Professor Actual Factual> How to statically compile `importc` functions in nim?↵See: https://play.nim-lang.org/#ix=3YfR
01:16:22FromDiscord<Elegantbeef> You cannot
01:16:36FromDiscord<Elegantbeef> You'd use `let` instead of \`const
01:16:43FromDiscord<Professor Actual Factual> In reply to @Elegantbeef "You cannot": 😦 Damn, that sucks
01:16:57FromDiscord<Professor Actual Factual> I kind of need const to support multithreading with globals
01:17:12FromDiscord<retkid> isn't that already done
01:17:34FromDiscord<Elegantbeef> Why do you need const for a function pointer
01:17:39FromDiscord<Elegantbeef> `let` should suffice
01:17:45FromDiscord<Professor Actual Factual> This is a toy example, but if it were let
01:17:54FromDiscord<Professor Actual Factual> I would not be able to use that function in a multithreaded application
01:18:00FromDiscord<Elegantbeef> Yes you would
01:18:13FromDiscord<retkid> ~~cant you just use createShared~~
01:18:20FromDiscord<Elegantbeef> Why would you need to
01:18:24FromDiscord<Elegantbeef> It's a procedure
01:18:27FromDiscord<Elegantbeef> It's not a heap allocation
01:18:52FromDiscord<Professor Actual Factual> Hmm, i experienced this about a year back, I will try to reproduce again with minimal example. I could be wrong
01:19:14FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/zwt
01:19:26FromDiscord<Elegantbeef> You can override the thread analysis
01:19:42FromDiscord<retkid> wait why is that gcsafe?
01:19:48FromDiscord<Elegantbeef> You know a global pointer to a proc is GcSafe so you can tell it as such
01:19:59FromDiscord<Elegantbeef> Cause a pointer proc isnt gc'd?
01:20:21FromDiscord<Elegantbeef> It's an address to a pointer it's like having `let a = 10`
01:20:55FromDiscord<Elegantbeef> It's odd Nim thinks it's unsafe to access a pointer proc from a procedure but we can override the compilers reasoning cause we're adults
01:23:39FromDiscord<retkid> https://media.discordapp.net/attachments/371759389889003532/977381121606164490/unknown.png
01:23:41FromDiscord<retkid> i forgot about this
01:24:09FromDiscord<Professor Actual Factual> sent a code paste, see https://play.nim-lang.org/#ix=3YfS
01:24:21FromDiscord<Elegantbeef> Might need `{.cast(gcSafe).}:` instead
01:24:48FromDiscord<retkid> nim does have a problem of thinking the gc is upset when shes just having fun
01:24:49FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3YfT
01:25:15FromDiscord<Elegantbeef> I mean it's generally right
01:25:54FromDiscord<Elegantbeef> In this case it's gcsafe, but i think the compiler has an issue that "all procedures are gcunsafe" even though it should just be "all closures"
01:27:13FromDiscord<Professor Actual Factual> sent a code paste, see https://play.nim-lang.org/#ix=3YfX
01:27:17FromDiscord<Elegantbeef> really if you didnt want this cast you could do `template printfconst: auto = printf`
01:27:29FromDiscord<Professor Actual Factual> sent a code paste, see https://play.nim-lang.org/#ix=3YfZ
01:31:23*noeontheend joined #nim
01:35:49FromDiscord<retkid> In reply to @huantian "": https://media.discordapp.net/attachments/371759389889003532/977384182336594070/Peek_2022-05-13_14-46.gif
01:35:59FromDiscord<retkid> In reply to @huantian "": https://media.discordapp.net/attachments/371759389889003532/977384226544578580/Peek_2022-05-20_21-35.webm
01:39:12FromDiscord<huantian> eh?
01:47:06FromDiscord<Elegantbeef> That's my word!
02:15:38FromDiscord<retkid> In reply to @huantian "eh?": you cherry picked, almost none of them have any code eamples
02:16:01FromDiscord<Elegantbeef> It's a relatively light wrapping over the underlying API
02:18:23FromDiscord<retkid> also how do i get the maximum size of a stream buffer
02:18:27FromDiscord<retkid> (edit) removed "buffer"
02:18:44FromDiscord<retkid> ie, highest possible position
02:18:59FromDiscord<Elegantbeef> There is no limit
02:19:35FromDiscord<retkid> where it ends?
02:19:40FromDiscord<retkid> where there is no more file to read
02:20:27FromDiscord<Elegantbeef> Streams can be streamed in
02:21:02FromDiscord<Elegantbeef> You cannot know the end of a stream
02:21:10FromDiscord<Elegantbeef> You read until the end
02:22:22FromDiscord<retkid> In reply to @Elegantbeef "You read until the": well... how do i know that
02:22:38FromDiscord<Elegantbeef> `atEnd`
02:22:46FromDiscord<retkid> if s.atEnd
02:24:13FromDiscord<Elegantbeef> Consider a socket stream you'll never know how much data they'll send
02:39:07*noeontheend quit (Ping timeout: 260 seconds)
02:49:00*ltriant joined #nim
02:53:10*ltriant quit (Ping timeout: 240 seconds)
03:01:37*ltriant joined #nim
03:24:39*ltriant quit (Ping timeout: 246 seconds)
04:03:49*ltriant joined #nim
04:08:54*ltriant quit (Ping timeout: 272 seconds)
04:40:27*ltriant joined #nim
04:45:38*ltriant quit (Ping timeout: 272 seconds)
05:10:12*jmdaemon quit (Ping timeout: 260 seconds)
05:17:38*ltriant joined #nim
05:22:36*ltriant quit (Ping timeout: 246 seconds)
05:46:08FromDiscord<Bung> pls help me with this https://github.com/bung87/nimlsp/runs/6528943266?check_suite_focus=true
05:49:22FromDiscord<m4ul3r> sent a code paste, see https://play.nim-lang.org/#ix=3Ygs
05:59:50*Jjp137 quit (Ping timeout: 250 seconds)
06:00:08*Jjp137 joined #nim
06:05:49FromDiscord<retkid> Under what conditions is out of memory defect outputted
06:06:04*dithpri quit (Ping timeout: 240 seconds)
06:15:11FromDiscord<Zectbumo> @m4ul3r you need to runForever() in order to process messages
06:17:05FromDiscord<Zectbumo> In reply to @retkid "Under what conditions is": I would tell you, but then you would think it was obvious
06:18:07FromDiscord<retkid> In reply to @Zectbumo "I would tell you,": I meant a bit more technical then that because my program takes up almost no memory but yet is out of it
06:21:00FromDiscord<Zectbumo> oh. well it's when the memory allocator returns a nil because it ran out of allocation space. why do you think your program takes no memory? maybe you have a leak
06:22:00FromDiscord<m4ul3r> In reply to @Zectbumo "<@186968592544301058> you need to": Got it 👍 , I just need to call poll() within my while loop then
06:30:41*dithpri joined #nim
06:36:18FromDiscord<retkid> In reply to @Zectbumo "oh. well it's when": I’m trying to skip 70gbs into a stream
06:36:44FromDiscord<Zectbumo> burning bandwidth huh? sticking it to the man
06:37:01FromDiscord<retkid> Nono thats tomorrow
06:38:04*dithpri quit (Ping timeout: 240 seconds)
06:38:05FromDiscord<Zectbumo> so did you run top and watch your memory go up up up?
06:39:01FromDiscord<ripluke> i wonder why the nim distros module sucks, its not that hard to implement it better
06:39:18FromDiscord<Zectbumo> @ripluke do it!
06:39:41FromDiscord<ripluke> sent a code paste, see https://play.nim-lang.org/#ix=3YgC
06:39:47FromDiscord<ripluke> easy nim code to get users distro
06:39:57*dithpri joined #nim
06:40:10FromDiscord<ripluke> Works for any distro :)
06:40:19FromDiscord<retkid> In reply to @Zectbumo "so did you run": I saw no such thing
06:41:06FromDiscord<Zectbumo> In reply to @ripluke "Works for any distro": any linux distro, you mean?
06:41:15FromDiscord<retkid> In reply to @ripluke "Works for any distro": How do you know if you’re running Linux hmmm
06:41:22FromDiscord<retkid> Apart from the extremely obvious
06:41:36FromDiscord<ripluke> In reply to @Zectbumo "any linux distro, you": yes
06:41:45FromDiscord<ripluke> probably works on mac aswell
06:41:59FromDiscord<Zectbumo> no, not mac. it is BSD based
06:42:18FromDiscord<ripluke> os-release doesnt exist on mac?
06:42:20FromDiscord<retkid> Might still be an os release for posix compat
06:42:28FromDiscord<Zectbumo> that's not posix
06:42:29FromDiscord<ripluke> In reply to @retkid "Might still be an": yes
06:43:10FromDiscord<retkid> In reply to @Zectbumo "that's not posix": They still try to have most posix compatibilities. This one is easy to implement so I don’t see why not
06:43:31FromDiscord<retkid> I’m very upset woeusb isn’t bootable ugh
06:44:05FromDiscord<ripluke> ahh it doesnt, i might have to implement some conditionals
06:44:16FromDiscord<Zectbumo> In reply to @retkid "They still try to": that's not how that works. and no. it's not posx and no mac does not have /etc/os-release
06:44:34*dithpri quit (Ping timeout: 240 seconds)
06:44:49FromDiscord<Zectbumo> In reply to @ripluke "ahh it doesnt, i": I would be surprised even if ALL linux distros does that
06:45:18FromDiscord<ripluke> In reply to @Zectbumo "I would be surprised": all gnu/linux distros do that
06:45:27FromDiscord<Zectbumo> okay. maybe so
06:45:36FromDiscord<ripluke> there are probably only 2 or 3 that dont
06:45:39FromDiscord<Zectbumo> but not BSD, not Mac, not windows
06:45:46FromDiscord<ripluke> yea
06:45:51FromDiscord<ripluke> unfortunately
06:45:57FromDiscord<Zectbumo> so your % success is really low
06:46:00FromDiscord<retkid> In reply to @Zectbumo "I would be surprised": They have to, to be posix compliant
06:46:19FromDiscord<retkid> That is the standard way to read Linux
06:46:24FromDiscord<ripluke> In reply to @Zectbumo "so your % success": yea
06:46:27FromDiscord<retkid> If you wanna be sure, do a
06:46:38FromDiscord<Zectbumo> yeah, that's not posix
06:46:42FromDiscord<retkid> “If: else”
06:47:17FromDiscord<ripluke> might have to use the distro module and see if its macos or bsd, bc at the end of the day im not trying to rewrite it
06:48:08FromDiscord<retkid> Alrighty so
06:48:18FromDiscord<retkid> os-release is a system d thing
06:48:37FromDiscord<retkid> Anything that uses init d is somewhere else im pretty sure
06:48:47FromDiscord<retkid> Most things are system d
06:48:54FromDiscord<ripluke> In reply to @retkid "os-release is a system": artix has one even though it doesnt use sysd
06:49:14FromDiscord<Zectbumo> see, even not all linux has os-release
06:49:15FromDiscord<retkid> Void has one
06:49:21FromDiscord<retkid> Gentoo as well
06:49:23FromDiscord<ripluke> yea
06:49:32FromDiscord<Zectbumo> https://unix.stackexchange.com/questions/351557/on-what-linux-distributions-can-i-rely-on-the-presence-of-etc-os-release
06:49:36FromDiscord<Rika> Not necessarily
06:49:49FromDiscord<retkid> In reply to @Rika "Not necessarily": Leave gentoo customizability out of this
06:49:53FromDiscord<Rika> If it’s a system d thing then there’s a few distributions you’re not hitting
06:50:04FromDiscord<Rika> In reply to @retkid "Leave gentoo customizability out": That’s the point of Gentoo
06:51:28FromDiscord<demotomohiro> My gentoo doesnt use systemd but has /etc/os-release
06:51:35FromDiscord<retkid> If your Linux environment has been released in the last 15 years and has no os-release it’s a design decision
06:51:36FromDiscord<ripluke> Most others also have it
06:51:41FromDiscord<Zectbumo> @ripluke here, this is what you need. posix compliant:↵`The uname utility is compliant with the IEEE Std 1003.1-2008 ("POSIX.1")↵ specification.`
06:51:50FromDiscord<ripluke> Yea it's uname
06:51:58FromDiscord<ripluke> Uname is anything unix
06:52:03FromDiscord<Zectbumo> no
06:52:09*tiorock joined #nim
06:52:10*tiorock quit (Changing host)
06:52:10*tiorock joined #nim
06:52:10*rockcavera quit (Killed (calcium.libera.chat (Nickname regained by services)))
06:52:10*tiorock is now known as rockcavera
06:52:10FromDiscord<Zectbumo> it's anything posix compliant
06:52:16FromDiscord<ripluke> Mac and bsd support it
06:52:17FromDiscord<Zectbumo> there are unix that are not posix compliant
06:52:24FromDiscord<ripluke> In reply to @Zectbumo "there are unix that": Oh
06:52:25FromDiscord<retkid> execute uname output to folder then read that folder
06:52:36FromDiscord<retkid> To file
06:52:50FromDiscord<ripluke> In reply to @retkid "execute uname output to": How do u run shcmds in nim
06:53:43FromDiscord<Zectbumo> Linux != GNU != UNIX != POSIX
06:53:52FromDiscord<retkid> exCMDEx
06:53:55FromDiscord<retkid> From os
06:54:02FromDiscord<ripluke> Oh
06:54:05FromDiscord<retkid> (edit) "exCMDEx" => "exCmdEx"
06:54:14FromDiscord<retkid> Or something it’s in OS I’m on mobile
06:54:19FromDiscord<ripluke> In reply to @Zectbumo "Linux != GNU !=": Ya
06:54:23FromDiscord<demotomohiro> !eval echo static(staticExec("uname -a"))
06:54:25NimBotLinux 761a1dc8ecf7 5.4.0-110-generic #124-Ubuntu SMP Thu Apr 14 19:46:19 UTC 2022 x86_64 Linux
06:54:45FromDiscord<ripluke> In reply to @retkid "Or something it’s in": I'll read the docs, now that I know it's in os
06:54:58FromDiscord<ripluke> !eval echo static(staticExec("uname -r"))
06:55:00NimBot5.4.0-110-generic
06:55:10FromDiscord<ripluke> Kernel version
06:55:16*dithpri joined #nim
06:55:27FromDiscord<ripluke> So on Mac it'd be darwin
06:55:49FromDiscord<Zectbumo> yeah but not with -r
06:56:05FromDiscord<ripluke> R shows kernel
06:56:24FromDiscord<ripluke> Which would make it super easy to identify mac
06:56:33FromDiscord<retkid> This is like 2 steps away from malware
06:56:40FromDiscord<retkid> Though I suppose anything is
06:57:09FromDiscord<Zectbumo> In reply to @ripluke "R shows kernel": are you saying capital R?
06:57:12FromDiscord<ripluke> In reply to @retkid "This is like 2": It's much less sus to just implement some conditials with the distros module
06:57:19FromDiscord<ripluke> In reply to @Zectbumo "are you saying capital": No the -r flag
06:57:35FromDiscord<ripluke> But I have autocaps cuz mobile :/
06:58:11FromDiscord<Zectbumo> that's the release and on mac it shows something like "xx.x.x"
06:58:36FromDiscord<ripluke> In reply to @Zectbumo "that's the release and": Doesn't say Darwin? I've never used mac
06:59:01FromDiscord<Zectbumo> uname -s says "Darwin"
06:59:08FromDiscord<ripluke> In reply to @Zectbumo "uname -s says "Darwin"": Oh
06:59:17FromDiscord<ripluke> !eval echo static(staticExec("uname -s"))
06:59:19NimBotLinux
06:59:32FromDiscord<ripluke> That might work
07:02:02*dithpri quit (Remote host closed the connection)
07:03:51FromDiscord<Zectbumo> @ripluke https://nim-lang.org/docs/posix_utils.html#uname_2
07:05:02FromDiscord<Zectbumo> !eval import std/posix_utils;echo uname().sysname
07:05:06NimBotLinux
07:09:31FromDiscord<retkid> !eval import std/posix_utils;echo uname()
07:09:35NimBotCompile failed: (sysname: "Linux", nodename: "f1ab22ce5af5", release: "5.4.0-110-generic", version: "#124-Ubuntu SMP Thu Apr 14 19:46:19 UTC 2022", machine: "x86_64")
07:09:52FromDiscord<retkid> well
07:09:56FromDiscord<retkid> i got it anyway lmao
07:10:01FromDiscord<Zectbumo> it's an object
07:10:04FromDiscord<retkid> ye
07:10:24FromDiscord<retkid> !eval import std/posix_utils;echo uname().version
07:10:27NimBot#124-Ubuntu SMP Thu Apr 14 19:46:19 UTC 2022
07:11:19FromDiscord<Zectbumo> !eval import std/posix_utils;echo $uname()
07:11:22NimBotCompile failed: (sysname: "Linux", nodename: "0d2a00fd4307", release: "5.4.0-110-generic", version: "#124-Ubuntu SMP Thu Apr 14 19:46:19 UTC 2022", machine: "x86_64")
07:12:31FromDiscord<Zectbumo> that's odd
07:12:46FromDiscord<retkid> sent a code paste, see https://play.nim-lang.org/#ix=3YgJ
07:13:14FromDiscord<ripluke> sent a code paste, see https://play.nim-lang.org/#ix=3YgK
07:13:25FromDiscord<retkid> In reply to @ripluke "what i implemented: ": look at my code
07:13:33FromDiscord<retkid> use a case statement
07:14:11FromDiscord<ripluke> In reply to @retkid "use a case statement": yea i will optimize thee code
07:14:35FromDiscord<retkid> look
07:14:39FromDiscord<retkid> ima be real
07:15:02FromDiscord<demotomohiro> !eval import distros; echo foreignDepInstallCmd("nim")
07:15:07NimBotCompile failed: ("<your package manager here> install nim", true)
07:15:17FromDiscord<retkid> fuck anyone who uses a BSD which isn't freebsd or openbsd
07:15:20FromDiscord<retkid> you're too far gone
07:15:37FromDiscord<retkid> bsd is already far too niche
07:15:42FromDiscord<retkid> (edit) "bsd" => "freebsd"
07:15:42FromDiscord<ripluke> sent a code paste, see https://play.nim-lang.org/#ix=3YgL
07:15:47FromDiscord<retkid> going farther is like
07:15:49FromDiscord<retkid> "ok"
07:15:52FromDiscord<demotomohiro> eval doesnt support multiple lines
07:15:56FromDiscord<ripluke> nice
07:16:20FromDiscord<retkid> if make an enum
07:16:32FromDiscord<ripluke> it works for me on linux so it should work
07:16:34FromDiscord<retkid> i'd
07:16:37FromDiscord<Zectbumo> !eval↵echo "hello"↵echo "world"
07:16:53FromDiscord<Zectbumo> nope
07:16:53FromDiscord<Rika> In reply to @retkid "fuck anyone who uses": NetBSD
07:17:08FromDiscord<retkid> In reply to @Rika "NetBSD": i forgot about netBSD but thats just far enough
07:17:16FromDiscord<ripluke> In reply to @retkid "i forgot about netBSD": yea
07:17:19FromDiscord<retkid> anything farther is "i will not support"
07:17:24FromDiscord<Rika> “Technically macOS is a BSD”
07:17:34FromDiscord<retkid> Oh I'll never support mac
07:17:37FromDiscord<ripluke> In reply to @Rika "“Technically macOS is a": its DARWIN :)
07:17:45FromDiscord<Rika> I said technically
07:17:47FromDiscord<retkid> the day i support mac is the day i die
07:17:52FromDiscord<Rika> Darwin is based on BSD so technically
07:17:53FromDiscord<ripluke> In reply to @Rika "I said technically": ye ik
07:18:09FromDiscord<ripluke> In reply to @Rika "Darwin is based on": yea
07:18:17FromDiscord<Zectbumo> and technically technically it was based on FreeBSD
07:18:28FromDiscord<Zectbumo> but nobody is allowed to say that
07:18:34FromDiscord<Zectbumo> because of the license
07:18:49FromDiscord<retkid> hah
07:18:54FromDiscord<retkid> you cant fork it and make it closed sorced
07:18:55FromDiscord<retkid> sad
07:19:06FromDiscord<Rika> If there are BSD based operating systems are there BSD cringe operating systems
07:19:11FromDiscord<ripluke> In reply to @Zectbumo "and technically technically it": wait does the bsd license not make u make any code modifications public like the gnu licensce
07:19:39FromDiscord<retkid> In reply to @ripluke "wait does the bsd": opposite
07:19:39FromDiscord<Zectbumo> no, welcome to BSD 😄
07:20:25FromDiscord<retkid> nvm
07:20:25FromDiscord<Zectbumo> I wouldn't say opposite. it just doesn't have that requirement
07:20:32FromDiscord<retkid> ^^^
07:20:44FromDiscord<retkid> sleepy im trying to figure out if installing windows will nuke my drives again
07:20:46FromDiscord<retkid> 😔
07:21:14FromDiscord<Zectbumo> yeah, why is harddrive management SOO difficult on windows?
07:21:23FromDiscord<Zectbumo> it's like computers 101
07:21:34FromDiscord<retkid> last time i tried to install windows 8 it nuked both of my other partitions
07:21:37FromDiscord<retkid> i tried to delete one
07:21:48FromDiscord<retkid> im going to keep it unallocated and maybe it'll leave it alone?
07:21:57FromDiscord<Rika> Windows nukes partitions on the same drive but not other drives I believe
07:22:03FromDiscord<Zectbumo> windows 8? then you deserved it
07:22:07FromDiscord<retkid> well
07:22:15FromDiscord<retkid> i only need windows for 1 thing
07:22:19FromDiscord<retkid> In reply to @Rika "Windows nukes partitions on": im on GPT
07:22:24FromDiscord<retkid> it shouldn't have touched the other drives
07:22:35FromDiscord<retkid> (edit) "drives" => "partitions"
07:22:55FromDiscord<Rika> Windows don’t give no fucks
07:23:07FromDiscord<Zectbumo> I booted into win8 the other day on and old machine I pulled out of the closet. MS installed a shortcut with Windows 10 installer on it
07:23:29FromDiscord<Zectbumo> (edit) "it" => "the desktop"
07:23:31FromDiscord<ripluke> how do i get cpu usage in nim? couldnt find it in the os module
07:23:37FromDiscord<Rika> Windows likes fucking with you no matter what you do with drives so just keep it in its own drive is what I do
07:23:54FromDiscord<retkid> In reply to @Rika "Windows likes fucking with": my hhd is on my other house
07:23:56FromDiscord<retkid> 😭
07:24:03FromDiscord<retkid> (edit) "on" => "in"
07:24:05FromDiscord<Rika> Hard hard disk
07:24:10FromDiscord<retkid> very hard
07:24:15FromDiscord<ripluke> yes
07:24:23FromDiscord<retkid> it runs at like 10 mb/s
07:24:37FromDiscord<retkid> thats why i caled it my hhd and not my hdd, you guys believe me right, im not brain dead, right
07:24:42FromDiscord<ripluke> soft soft disk
07:24:47FromDiscord<ripluke> ssd
07:25:00FromDiscord<Rika> Solid disk drive
07:25:02FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=3YgN
07:25:10FromDiscord<Rika> In reply to @Isofruit "This one is a": some 5
07:25:17FromDiscord<Rika> Well I guess that doesn’t work too well either
07:25:18FromDiscord<retkid> solid disk devide
07:25:33FromDiscord<Rika> So maybe convert that 5 into the range too
07:25:39FromDiscord<Phil> In reply to @Rika "Well I guess that": Ah, forget that one for the example, but that won't work either
07:25:53FromDiscord<demotomohiro> I first installed windows8 on my machine and then installed linux without writing boot loader on ssd. I write boot loader on usb stick and I insert it when I want to run Liunx.
07:25:55FromDiscord<Phil> Is there a way to do it in a single line though?
07:26:07FromDiscord<Phil> because `5.0..9` isn't a thing
07:26:39FromDiscord<Elegantbeef> `some(range[0..9](5))`
07:27:33FromDiscord<Phil> Ahhh thanks!↵I think that also might allow me to do "none"'s
07:27:38FromDiscord<Phil> (edit) "Ahhh thanks!↵I think that also might allow me to do "none"'s ... " added "for range optionals"
07:27:50FromDiscord<Elegantbeef> You can also make a typedesc
07:28:25FromDiscord<Phil> Hmm fair
07:32:17FromDiscord<Andreas> I have a simple question: Indexes into seqs, tables and basically any container i use are positive Integers. So why is it a type-error to use a uint8 - which is might be a small one, but still a perfect integer ? But it somehow doesnt fit the bill ? I need to do int( my-small-uint ) to make things work - can one use a converter for such cases ?
07:32:37FromDiscord<Andreas> (edit) removed "is"
07:33:14FromDiscord<Rika> You can sure
07:33:27FromDiscord<Rika> Nim prefers explicit type conversion for unsigned to signed
07:33:29FromDiscord<demotomohiro> https://github.com/nim-lang/Nim/wiki/Unofficial-FAQ#why-are-unsigned-types-discouraged
07:33:46FromDiscord<Zectbumo> In reply to @ripluke "how do i get": !eval import std/posix; var r: Rusage; RUSAGE_SELF.getrusage(r.addr); echo r.ru_utime.tv_sec
07:33:59FromDiscord<Zectbumo> !eval import std/posix; var r: Rusage; RUSAGE_SELF.getrusage(r.addr); echo r.ru_utime.tv_sec
07:34:01NimBotCompile failed: /usercode/in.nim(1, 70) Error: type mismatch: got <Time>
07:35:03FromDiscord<Zectbumo> !eval import std/posix; var r: Rusage; RUSAGE_SELF.getrusage(r.addr); echo r.ru_utime
07:35:06NimBot(tv_sec: ..., tv_usec: 431)
07:36:32FromDiscord<Zectbumo> I'm not sure why `.tv_sec` doesn't work
07:37:37FromDiscord<Rika> Its some object with no $ proc
07:37:41*ltriant joined #nim
07:38:11FromDiscord<Zectbumo> oh, it's yet another level. sheesh that's a lot
07:41:26FromDiscord<retkid> Rika what are the chances it nukes my other 2 partitions if its unpartitioned
07:41:29FromDiscord<retkid> 🥺
07:41:35FromDiscord<Rika> In reply to @retkid "Rika what are the": What?
07:41:39FromDiscord<Rika> Windows? I don’t know
07:41:44FromDiscord<Zectbumo> it's gotta be low chances
07:41:47FromDiscord<Rika> Windows is fickle or something
07:41:54FromDiscord<retkid> https://media.discordapp.net/attachments/371759389889003532/977476311763279962/unknown.png
07:42:12FromDiscord<retkid> gonna backup my code
07:42:20FromDiscord<Zectbumo> it's going to nuke your EFI partition
07:43:01FromDiscord<Zectbumo> wait, that's not normal. your EFI is HUGE
07:43:02*ltriant quit (Ping timeout: 260 seconds)
07:43:17FromDiscord<Zectbumo> oh, "EFI System" I see
07:43:26FromDiscord<Zectbumo> that is some tiny font
07:43:40FromDiscord<retkid> https://media.discordapp.net/attachments/371759389889003532/977476757902995456/unknown.png
07:43:42FromDiscord<retkid> its so large
07:43:44FromDiscord<retkid> thats it gpt
07:44:28FromDiscord<Zectbumo> I hope that's on ssd
07:44:42FromDiscord<retkid> https://media.discordapp.net/attachments/371759389889003532/977477014644748388/unknown.png
07:44:49FromDiscord<retkid> what do you think nvme stands for
07:45:15FromDiscord<Zectbumo> non volatile memory something
07:45:16FromDiscord<Rika> Something express
07:45:21FromDiscord<Zectbumo> express
07:45:24FromDiscord<Rika> Oh how neat
07:45:26FromDiscord<demotomohiro> sent a code paste, see https://paste.rs/nHy
07:45:29FromDiscord<Rika> Our guesses combine
07:45:52FromDiscord<Zectbumo> teamwork 🙂
07:46:00FromDiscord<Elegantbeef> demo that's a big ol' bug
07:46:14FromDiscord<Elegantbeef> Upcasting value types is an error
07:46:38FromDiscord<Elegantbeef> A -\> B is invalid but B -\> A should be valid
07:46:42FromDiscord<Elegantbeef> Assuming A is the parent type
07:47:28FromDiscord<Andreas> In reply to @demotomohiro "https://github.com/nim-lang/Nim/wiki/Unofficial-FAQ": ty, that reminds of another book "Women, fire, and dangerous things : what categories reveal about the mind" by G. Lakoff - he clearly forgot to mention "unsigned integers" - little oversight.
07:48:59FromDiscord<demotomohiro> I think both casting A <-> B is invalid for object type and it should be error.
07:50:17FromDiscord<demotomohiro> It seems copying value type `b: BaseObj = a` also copies runtime type info and `b of InheritObj` returns true.
07:52:56FromDiscord<Elegantbeef> No converting from B -\> A is completely safe
07:53:43FromDiscord<Elegantbeef> You lose fields but you can do it safely
07:54:00FromDiscord<Elegantbeef> also consider `proc doThing(a: var T)`
07:54:07FromDiscord<Elegantbeef> sorry `var A`
07:54:19FromDiscord<Elegantbeef> You can safely convert to `A`
07:54:41FromDiscord<Elegantbeef> `A -> B` should always be an error though like i said
07:56:06FromDiscord<Elegantbeef> Really stack allocated inheritance types should not even have type information imo
07:56:11FromDiscord<demotomohiro> Thank you, you are right. B -> A is safe.
08:03:05*dithpri joined #nim
08:04:46FromDiscord<retkid> So windows nuked grub
08:04:49FromDiscord<retkid> Not a good sign
08:05:09FromDiscord<Elegantbeef> Windows does that
08:05:23FromDiscord<Elegantbeef> Best way to dual boot is to disconnect your drive with grub on it and install windows then reconnect it
08:06:05FromDiscord<Rika> It will do that every time you update so
08:06:56*dithpri quit (Remote host closed the connection)
08:07:14FromDiscord<retkid> In reply to @Elegantbeef "Windows does that": sola un hard dive di me
08:07:45FromDiscord<Zectbumo> windows blows away boot partition (grub) and EFI and primary partition
08:07:55FromDiscord<Phil> In reply to @Rika "It will do that": Not every time, I#ve gone through like a year of updates before it did that to me
08:08:03FromDiscord<retkid> In reply to @Zectbumo "windows blows away boot": Primary?!
08:08:04FromDiscord<Phil> The second time I was done with windows and uninstalled
08:08:10FromDiscord<Phil> (edit) "The second time I was done with windows and uninstalled ... " added "it"
08:08:28FromDiscord<Zectbumo> In reply to @retkid "Primary?!": yeah where else do you think it's going to go? 😄
08:08:38FromDiscord<Zectbumo> Windows is never #2
08:08:57FromDiscord<Phil> For the move of bombing grub on the regular windows can kiss my ass
08:09:07FromDiscord<retkid> In reply to @Zectbumo "yeah where else do": That’s it I’m burning all of Seattle
08:09:21FromDiscord<Phil> Thankfully proton allows me to fullfill all of my gamer needs and for all other usecases Linux is easier to deal with
08:10:09FromDiscord<Rika> Too bad it doesn’t for me xd
08:10:16FromDiscord<Zectbumo> Seattle will be sad and Microsoft (in Redmond) will be scared
08:10:31FromDiscord<retkid> Redmond is Seattle to me
08:12:28FromDiscord<retkid> https://media.discordapp.net/attachments/371759389889003532/977484004657889390/IMG_2253.png
08:12:33FromDiscord<retkid> This is unfortunate
08:12:40FromDiscord<Zectbumo> well, they are 15 miles apart, so your fire better be big and waterproof because you are going to need to jump a 2 mile lake
08:13:31FromDiscord<Zectbumo> meh, logistics
08:14:27FromDiscord<demotomohiro> At least, installing grub on usb flash and installing windows and linux on same SSD works for me.
08:14:58FromDiscord<Zectbumo> In reply to @retkid "This is unfortunate": You think MS didn't think of this already with all the people that wants to burn them down 😉
08:15:10FromDiscord<Zectbumo> they built a moat!
08:15:42FromDiscord<Elegantbeef> Cant moat a nuclear blast
08:16:04FromDiscord<retkid> In reply to @demotomohiro "At least, installing grub": I’m installing grub again lmao it knows how to disable wbl
08:16:07FromDiscord<0ffh> In reply to @retkid "So windows nuked grub": It did that kind of shit from the beginning. When dual-booting you'd always have to either install Windows first, then linux, or manually restore lilo after.
08:16:57FromDiscord<Zectbumo> linux is a subsystem (#2)
08:18:17FromDiscord<retkid> Rufus arch and install grub is my current plan lmao
08:18:34FromDiscord<Yardanico> can we maybe switch the discussions between #main and #offtopic 🤔
08:18:40FromDiscord<Zectbumo> I was thinking that too
08:18:49FromDiscord<Zectbumo> back to topic, how do I get fields from posix.Time?
08:21:01FromDiscord<0ffh> Now I have a setup with easily removable hdds. When I want to windows (for gaming, no other use really), I physically remove my linux hdd and insert the windows hdd. As an additional plus, I'm sure that no windows malware can tamper with my linux setup.
08:26:59FromDiscord<untoreh> `arc` is still stop the world gc right?
08:27:17FromDiscord<Phil> I am not sure what a "stop the world gc" is
08:27:21FromDiscord<Yardanico> In reply to @untoreh "`arc` is still stop": not at all
08:27:38FromDiscord<Yardanico> it just calls =destroy on the variables in scope right at the end of the scope
08:27:49FromDiscord<Yardanico> do you call refcounting or destructors "stop the world"?
08:28:17FromDiscord<Yardanico> In reply to @Yardanico "it just calls =destroy": for non-ref types this just calls their destructor, for ref types it decrements the refcounter, and if it's 0, destroys the underlying data and frees the reference
08:28:18FromDiscord<untoreh> but destructors don't run in parallel?
08:28:22FromDiscord<Elegantbeef> Refc isnt even stop the world
08:28:27FromDiscord<Rika> In reply to @untoreh "but destructors don't run": ?
08:28:30FromDiscord<Yardanico> In reply to @untoreh "but destructors don't run": but that still doesn't make it "stop the world"
08:28:37FromDiscord<Yardanico> it's sequential code, why would it run in parallel
08:28:43FromDiscord<Yardanico> even C++ destructors "don't run in parallel"
08:29:10FromDiscord<retkid> It would be slower to run it in parallel
08:29:26FromDiscord<retkid> Because of how threads are instantiated
08:29:36FromDiscord<retkid> Though I’m probably wrong lmao
08:29:44FromDiscord<Elegantbeef> Well you also cant do it on threads
08:29:44FromDiscord<Rika> You could just use thread pooling
08:29:48FromDiscord<untoreh> ok so I think that's why I can't acquire python gil from within a destructor 😛
08:29:54FromDiscord<Rika> But that’s besides the point
08:30:00FromDiscord<Elegantbeef> There could be thread local resources that need to be disposed of
08:30:10FromDiscord<Yardanico> In reply to @untoreh "ok so I think": maybe you can ask your actual question instead of trying to speculate :)
08:30:14FromDiscord<retkid> In reply to @Elegantbeef "There could be thread": Threads all the way down
08:30:14FromDiscord<Elegantbeef> Guess it doesnt matter for arc/orc
08:30:22FromDiscord<Yardanico> destructors have some quirks, e.g. they might be called multiple times sometimes
08:30:28FromDiscord<demotomohiro> !eval echo "Ρ"[0].int, ", ", "P"[0].int
08:30:28FromDiscord<Yardanico> so you need to check if the underlying data is already destroyed
08:30:30NimBot206, 80
08:30:45FromDiscord<untoreh> it's this https://github.com/yglukhov/nimpy/issues/263
08:31:03FromDiscord<Rika> In reply to @demotomohiro "!eval echo "Ρ"[0].int, ",": Oi oi oi wait a minute
08:31:13FromDiscord<Elegantbeef> Unicode goes brr
08:31:18FromDiscord<Yardanico> In reply to @Rika "Oi oi oi wait": greek P vs ascii P
08:31:22FromDiscord<Rika> I know
08:31:45FromDiscord<Yardanico> also the way .int is used is wrong because it's not a single byte character :)
08:32:01FromDiscord<demotomohiro> But you can use unicode characters for username in Github?
08:32:04FromDiscord<Yardanico> no
08:32:06FromDiscord<Elegantbeef> "wrong" in that they care
08:32:27FromDiscord<Yardanico> you can use them for the nickname (the displayed name), but not your username
08:33:44FromDiscord<Yardanico> In reply to @untoreh "it's this https://github.com/yglukhov/nimpy/issues/": do you have some code to reproduce it maybe? it would help for people who might try solving the issue
08:34:02FromDiscord<demotomohiro> So you cannot use greek P or other unicode for impersonating in Github.
08:34:08FromDiscord<Yardanico> yes, you can't
08:35:12FromDiscord<Yardanico> github username is 1-39 chars, can only contain a-z, A-Z, 0-9 and dash (-) and cannot start with a dash
08:35:45FromDiscord<demotomohiro> So only lower case 'L' and upper case 'I' can be used for impersonating in Github?
08:36:26FromDiscord<aph> petition forcing github to use a better font
08:37:28FromDiscord<demotomohiro> Or use case insensitivity for user name?
08:37:47FromDiscord<aph> true, that sounds better
08:37:48FromDiscord<Yardanico> In reply to @demotomohiro "Or use case insensitivity": how would that solve capitalized i vs l ?
08:37:54FromDiscord<Yardanico> Il
08:38:00FromDiscord<Yardanico> `Il`
08:38:04FromDiscord<Yardanico> they're different letters
08:39:36FromDiscord<demotomohiro> Ah, it solves only `I` and `l`, but `i` and `l`.
08:39:52FromDiscord<Elegantbeef> homoglyphs suck
08:44:15FromDiscord<Zectbumo> ah I finally got it. the answer was `.int`
08:44:20FromDiscord<Zectbumo> !eval import std/posix; var r: Rusage; RUSAGE_SELF.getrusage(r.addr); echo r.ru_utime.tv_sec.int
08:44:22NimBot0
08:45:28FromDiscord<Yardanico> In reply to @Zectbumo "!eval import std/posix; var": i just hope you're not planning to use Rusage for benchmarking :)
08:46:26FromDiscord<Zectbumo> no, I was looking into the question https://discord.com/channels/371759389889003530/371759389889003532/977471686880395287
08:47:12FromDiscord<Elegantbeef> Zect if instead of copying a link to the message you replied to it, that'd be great
08:47:30FromDiscord<Zectbumo> but I ran across time_t which for some reason echo can't print
08:47:43FromDiscord<Elegantbeef> It's a distinct probably
08:48:02FromDiscord<Zectbumo> `Time {.importc: "time_t", header: "<time.h>".} = distinct clonglong`
08:48:31FromDiscord<Elegantbeef> Distinct if you dont know is identical shape to the type but not the same type
08:49:04FromDiscord<Elegantbeef> It's one of the best type features since sliced bread
08:49:08FromDiscord<Zectbumo> I read about it, but haven't used it. It would be nice if it exported $
08:49:33FromDiscord<Zectbumo> (edit) "exported" => "borrowed"
08:51:47FromDiscord<Zectbumo> hmm, maybe I can PR that
08:52:34FromDiscord<Elegantbeef> No
08:52:42FromDiscord<Elegantbeef> It shouldnt borrow any operations by default
08:52:47FromDiscord<Elegantbeef> That's the entire point of it
08:58:04FromDiscord<Zectbumo> well, it does
08:58:14FromDiscord<Elegantbeef> It does what?
08:58:18FromDiscord<Zectbumo> borrow
08:58:21FromDiscord<Elegantbeef> It only borrows `=` by default
08:58:26FromDiscord<Zectbumo> and...
08:58:35FromDiscord<Elegantbeef> It doesnt borrow anything else
08:59:09FromDiscord<Zectbumo> https://github.com/nim-lang/Nim/blob/devel/lib/posix/posix.nim#L677-L678
08:59:19FromDiscord<Elegantbeef> By default
08:59:35FromDiscord<Zectbumo> yeah so it borrows == and -
08:59:37FromDiscord<Elegantbeef> I misread your intention
08:59:47FromDiscord<Elegantbeef> I thought you were implying make distinct borrow `$` by default
08:59:58FromDiscord<Zectbumo> oh. no Time borrow $
09:00:11FromDiscord<Yardanico> In reply to @Zectbumo "yeah so it borrows": are you talking about Time or distinct
09:00:14FromDiscord<Yardanico> Beef is talking about distinct itself
09:00:16FromDiscord<Yardanico> not Time specifically
09:00:27FromDiscord<Elegantbeef> Yea yard we resolved the mix up
09:00:28FromDiscord<Zectbumo> Time
09:00:53FromDiscord<retkid> https://media.discordapp.net/attachments/371759389889003532/977496189882740736/IMG_2254.mov
09:01:07FromDiscord<Yardanico> you meant to post that to #offtopic ?
09:01:24FromDiscord<retkid> UHM YES SIR DEFINITELY MOD SAMA
09:01:59FromDiscord<Zectbumo> In reply to @Elegantbeef "Yea yard we resolved": too many "it" for me \:D
09:03:06FromDiscord<Zectbumo> @ElegantBeef , if `-` is borrowed then wouldn't you think `+` be borrowed too?
09:03:18FromDiscord<Elegantbeef> No clue
09:03:30FromDiscord<Zectbumo> (edit) "@ElegantBeef , if `-` is borrowed then wouldn't you think `+` ... be" added "should"
09:03:37FromDiscord<Zectbumo> "should"
09:03:44FromDiscord<Elegantbeef> Depends on the API
09:03:58FromDiscord<Elegantbeef> If the API calls for it then yes, otherwise no
09:04:18FromDiscord<Zectbumo> well, I think typically you do: now - then
09:05:03FromDiscord<Zectbumo> but it's possible that `then + someTime` would happen. I should add `+` to my PR too
09:08:45FromDiscord<planetis> Since it's time I would prefer to see a formatted message not just an integer
09:09:00FromDiscord<Yardanico> In reply to @planetis "Since it's time I": its raw Time though (from posix)
09:09:05FromDiscord<Yardanico> we have std/times for all the fancy time stuff
09:09:09FromDiscord<Yardanico> and std/monotimes
09:12:31FromDiscord<Forest> If i have two libraries that define a type that has the same fields as eachother, is there a way i could combine them in Nim for cleaner code?
09:12:45FromDiscord<Forest> Don't wanna have to keep casting them to the other
09:13:07FromDiscord<Elegantbeef> Use a converter
09:13:21FromDiscord<Elegantbeef> Other than that nope they're in sub modules you need to make them rely on the same type then
09:13:21FromDiscord<Forest> Wdym?
09:13:40FromDiscord<Yardanico> In reply to @Forest "Wdym?": https://nim-lang.org/docs/manual.html#converters
09:14:35FromDiscord<Forest> Ah thanks!
09:15:23FromDiscord<Zectbumo> In reply to @planetis "Since it's time I": it's seconds since epoc
09:17:42FromDiscord<Zectbumo> okay I'm not going to add `+`. I didn't realize that the `-` doesn't handle an int literal. and a `time + time` doesn't make sense unless you are trying to make a multiverse
09:21:01FromDiscord<Rika> Hey what’s wrong with that
09:24:02FromDiscord<Zectbumo> which part?
09:24:22FromDiscord<Rika> Making a multiverse
09:24:46FromDiscord<Zectbumo> I haven't tried it yet, but I hear it's the rage
09:25:56FromDiscord<Zectbumo> whoa, this is awesome. so I just edit the .nim source and the very next run I do already has my change in it?? whoa! no compiling?? this is tripping me out
09:26:32FromDiscord<Yardanico> what
09:26:51FromDiscord<Yardanico> if you use `nim r` it's just an alias for compiling and then running the resulting binary
09:28:11FromDiscord<Zectbumo> I don't know why I'm surprised. but I edited possix.nim std lib and ran my example code that used to not work with echo and now does. I guess I'm not used to modifying core libs and having them work so easily
09:29:15FromDiscord<Zectbumo> In reply to @Yardanico "if you use `nim": yes, I was `nim r` on my example.nim file but I didn't expect it to compile the std lib file I edited
09:29:28FromDiscord<Rika> Nim doesn’t do precompiling like Python or whatever else
09:29:44FromDiscord<Yardanico> In reply to @Zectbumo "yes, I was `nim": well that would be the same in any language that has statically linked stdlib
09:30:14FromDiscord<Zectbumo> er dynamically linked you mean?
09:30:25FromDiscord<Yardanico> no, statically linked
09:30:33FromDiscord<Yardanico> since all stdlib modules always get compiled into your binary
09:30:40FromDiscord<Yardanico> they're not separate shared libraries
09:30:42FromDiscord<Zectbumo> ah I see
09:31:26FromDiscord<Zectbumo> yeah, makes sense once it's all laid out. I'm just so pleased with nim all around
09:31:51FromDiscord<Yardanico> there is nimrtl that makes some of the stdlib dynamically linked, but it's rarely used and doesn't work with arc/orc as of now
09:31:57FromDiscord<Elegantbeef> Source stdlib is nice
09:32:35FromDiscord<Yardanico> although probably main reason nimrtl exist is to put the GC into a separate library so you can write multiple .dll's in Nim and have them interact with each other with GC'd objects
09:33:55FromDiscord<Yardanico> because nimrtl doesn't work for ARC/ORC for now if you want to share GC'd objects between the host app and .dlls if they're all written in Nim you have to use `-d:useMalloc` (you can also use `-d:useMalloc` together with another allocator, like mimalloc)
09:34:22FromDiscord<Yardanico> i mean specifically for arc/orc
09:40:32FromDiscord<Zectbumo> huh, I think I may have to make a further change. I don't think the `-` proc for Time is right. It returns a Time object, which is incorrect. That is a time delta and Time is epoc relative. It should return at least int or if there is a delta time, that
09:41:22FromDiscord<Zectbumo> https://github.com/nim-lang/Nim/blob/devel/lib/posix/posix.nim#L678
09:41:54FromDiscord<Yardanico> again, this is std/posix :P
09:42:06FromDiscord<Zectbumo> ?
09:42:18FromDiscord<Yardanico> In reply to @Zectbumo "?": it's just a raw wrapper over posix APIs
09:42:24FromDiscord<Yardanico> why don't you just convert it into std/times Time ?
09:42:26FromDiscord<Zectbumo> not this part
09:43:01FromDiscord<Yardanico> https://nim-lang.org/docs/times.html#fromUnix%2Cint64 and then you'll have a lot of nice Nim APIs
09:43:04FromDiscord<Rika> It’s returning the wrong type
09:43:06FromDiscord<Rika> Is what he means
09:43:14FromDiscord<Yardanico> In reply to @Rika "It’s returning the wrong": is it though?
09:43:34FromDiscord<Zectbumo> yeah, it's not returning a Time anymore once you subtract it from another Time
09:43:36FromDiscord<Rika> Tell me why not
09:43:38FromDiscord<Yardanico> i mean since Time is `distinct clonglong` there's not much difference to begin with
09:44:09FromDiscord<Zectbumo> it's distinctly different 😉
09:44:59FromDiscord<Zectbumo> If you get Time and subtract Time you get a delta seconds, which is int. Not Time which is seconds since epoch
09:46:35FromDiscord<Yardanico> In reply to @Zectbumo "If you get Time": isn't https://nim-lang.org/docs/posix.html#difftime%2CTime%2CTime made for that?
09:46:37FromDiscord<Yardanico> https://www.cplusplus.com/reference/ctime/difftime/
09:47:09FromDiscord<Zectbumo> hmm, a `cdouble`
09:47:13FromDiscord<Zectbumo> yes
09:47:51FromDiscord<Zectbumo> so, specifically it should be a cdouble
09:48:00FromDiscord<Yardanico> not at all
09:48:12FromDiscord<Zectbumo> I mean `difftime()` kind makes my point
09:48:19FromDiscord<Zectbumo> (edit) "kind" => "kinda"
09:48:22FromDiscord<Yardanico> `difftime` specifically returns a `cdouble` because `time_t` can be represented with different types
09:48:33FromDiscord<Yardanico> on POSIX specifically it's in seconds
09:48:40FromDiscord<Yardanico> https://stackoverflow.com/questions/34457931/why-does-difftime-return-a-double
09:48:52FromDiscord<Yardanico> i wonder why is `-` borrowed in the first place if there's `difftime` :P
09:49:23FromDiscord<Zectbumo> maybe `-` should just turn into `difftime` call
09:49:45FromDiscord<Zectbumo> and then I get my cdouble \:D
09:49:58FromDiscord<Yardanico> maybe you should just use std/times :)
09:50:28FromDiscord<Zectbumo> It's not me. it's rusage
09:50:43FromDiscord<Yardanico> In reply to @Zectbumo "It's not me. it's": as I said, you can just convert it into a std/times Time
09:50:49FromDiscord<Yardanico> and then rely on nice Nim APIs
09:50:54FromDiscord<Yardanico> https://nim-lang.org/docs/times.html#fromUnix%2Cint64
09:50:55FromDiscord<Zectbumo> I see
10:00:58FromDiscord<Zectbumo> int64! now that's thinking beyond 2032
10:01:14FromDiscord<Zectbumo> only 10 more years 😮
10:01:34FromDiscord<Zectbumo> y2k 2.0
10:01:36FromDiscord<Yardanico> In reply to @Zectbumo "int64! now that's thinking": time_t is also 64-bit nowadays
10:01:44FromDiscord<Yardanico> on most modern systems
10:01:46FromDiscord<Zectbumo> is your bank's tho?
10:02:23FromDiscord<Yardanico> In reply to @Zectbumo "is your bank's tho?": withdraw money just before that day comes, see if something bad happens, if not, just put the money back
10:02:23FromDiscord<Yardanico> ez
10:02:48FromDiscord<Rika> Smart
10:03:06FromDiscord<Rika> Inb4 global bank collapse because everyone does it
10:03:32FromDiscord<Zectbumo> oh, they had to roll back the database. you now have all your money back 😉
10:04:13FromDiscord<Rika> Gotta love fractional reserve banking
10:22:36FromDiscord<ambient> i dont think fractional reserve exists anymore, its all about central banks and their fronts
10:43:04FromDiscord<Zectbumo> well my PR is underway 💪
10:48:18FromDiscord<jmiven> In reply to @Zectbumo "int64! now that's thinking": It doesn't change much, but it's 2038, not 2032 🙂
10:48:52FromDiscord<Zectbumo> oh thank you 🙂 it's good to know it's still far away
10:49:01*dithpri joined #nim
10:49:10FromDiscord<Zectbumo> oh I see what I did "32" 32bit
10:49:17FromDiscord<Rika> I don’t know man 6 more years isn’t much further
10:55:22FromDiscord<Zectbumo> it's enough time that we may all be speaking russian by then
11:10:07*pro joined #nim
11:27:05*pro quit (Quit: pro)
11:33:15FromDiscord<sheerluck> or Nuclear winter
11:39:40*ltriant joined #nim
11:44:27*ltriant quit (Ping timeout: 246 seconds)
11:48:25FromDiscord<Bung> @PMunch I've done the nimlsp's windows compatibility
12:57:45ehmrybanks aready have time problems because today they are dealing with contracts that go beyond 2038
13:12:55ehmryalso, I made an obnouxiously esoteric clock https://git.sr.ht/~ehmry/tonaltime
13:14:14FromDiscord<Rika> cool it still neatly fits into a day
13:15:50*noeontheend joined #nim
13:19:58*xaltsc quit (Remote host closed the connection)
13:26:33FromDiscord<Forest> How is unix epoch gonna be solved then?
13:26:57FromDiscord<Rika> 64 bit is "enough"
13:26:59FromDiscord<Forest> If changing it to int64 isn't gonna do much, how can it be fixed? Will we have to throw that out?
13:27:13FromDiscord<Forest> Wait but i thought that was only limited to 2038
13:27:17FromDiscord<Rika> do you want to know how many years itll take for 64 bit
13:27:18FromDiscord<Rika> no
13:27:19FromDiscord<Rika> thats 32
13:27:29FromDiscord<Forest> Oh I'm dumb lmao
13:27:35FromDiscord<Forest> In reply to @Rika "do you want to": Yeah actually
13:27:58FromDiscord<Rika> for 64 bit its "AD `292 277 026 596`-12-04 15:30:08 UTC"
13:28:17FromDiscord<Rika> do you think the universe would still exist in 300 billion years
13:28:21FromDiscord<Forest> Huh... Neat
13:28:27FromDiscord<Forest> Lmao idk
13:28:45FromDiscord<Rika> the sun dies in 5 billion years
13:28:54FromDiscord<Rika> for reference
13:28:57ehmryand if you are worried about running over 300 billion years you can use a float64, just with less precision
13:29:41FromDiscord<Rika> if you're using nanosecond precision i guess 64 bits range is prolly a bit more worrying
13:29:55FromDiscord<Rika> you have other issues though when you need ns precision
13:31:08ehmryI saw a protocol proposal that used use jan 1, 3000CE as a reference
13:31:29ehmryif we are going to do something drastic then might as well set a new epoch in the future
13:32:41FromDiscord<Rika> for nanosecond precision it seems like "Friday, April 11, 2262 11:47:16 PM" is the limit of 64 bit
13:33:53FromDiscord<Rika> i checked too btw, it seems like the universe would be effectively dead in 1-100 trillion years so i guess for higher beings 64 bit would be a concern
13:53:41*noeontheend quit (Ping timeout: 244 seconds)
14:11:34om3gaHello! Update on my Issue, my code had problems, but not the criminal ones. So now ubsan prints that: /home/lenz/.choosenim/toolchains/nim-1.6.6/lib/system/excpt.nim:554:51: runtime error: member access within misaligned address 0x0000ffffffff for type 'struct TFrame', which requires 8 byte alignment
14:11:55om3gaIs this a bug in excpt.nim?
14:14:02om3gaI doubt that this caused by passing pointers, or something related to "undafe" things. with previous version, lldb poined to the same excpt.nim
14:19:07FromDiscord<Andreas> i found that nimlsp does not like includes very much. Apart from that - is there a better way to make a app configurable ? i'm using a combination of compiler-switches and includes ?
14:19:43FromDiscord<Andreas> (edit) "i found that nimlsp does not like includes very much. Apart from that - is there a better way to make a app configurable ? i'm using a combination of compiler-switches and includes ? ... " added "Nimble ?"
14:21:58FromDiscord<d4rckh> https://github.com/treeform/ws/issues/39#issuecomment-1133600597
14:22:03FromDiscord<d4rckh> does anyone have any idea about this?
14:23:50FromDiscord<!Patitotective> sent a code paste, see https://paste.rs/g3n
14:26:41FromDiscord<Andreas> In reply to @Patitotective "im not sure i": yes, correct, thats what i'm doing right now. But the `doSomething()`s are includes which nimlsp struggles a bit. And as my first option was a switch for 32- or 64-Bit support, i'd like to have some more. And the include-files get a bit hairy to organize..
14:29:03FromDiscord<!Patitotective> In reply to @Andreas "yes, correct, thats what": what about three modules: `main.nim`, `main32.nim` and `main64.nim`↵and you can _import_ those two modules into `main.nim`↵no need for includes_
14:29:05FromDiscord<!Patitotective> (edit) "includes_" => "_includes_"
14:33:32FromDiscord<Andreas> In reply to @Patitotective "what about three modules:": ty, i'll try that..
14:37:34FromDiscord<Bung> sent a code paste, see https://paste.rs/jqc
14:58:49ehmrywhat is the name of the nim mascot?
15:02:23FromDiscord<Rika> the badger?
15:02:31ehmrynevermind
15:02:39ehmryI don't think there is oneo
15:05:58FromDiscord<demotomohiro> https://github.com/nim-lang/RFCs/issues/104
15:13:59NimEventerNew thread by Stoneface86: Windows compile --app:staticlib error, see https://forum.nim-lang.org/t/9165
15:18:50FromDiscord<Andreas> In reply to @demotomohiro "https://github.com/nim-lang/RFCs/issues/104": why not Chimera ? https://en.wikipedia.org/wiki/Chimera_(mythology)
15:28:43*xet7 quit (Remote host closed the connection)
15:30:34*xet7 joined #nim
15:32:14FromDiscord<exelotl> tbh nimi is perfect and everyone who says otherwise has no taste :P
15:32:36FromDiscord<Rika> nimi is cute
15:32:42FromDiscord<Rika> a cute name
15:38:18FromDiscord<exelotl> (i meant the design for the mascot in the thread, but yes nimi is indeed a cute name for it)
15:41:22*ltriant joined #nim
15:46:10NimEventerNew Nimble package! capstone - Capstone3 high-level wrapper, see https://github.com/hdbg/capstone-nim
15:46:19*ltriant quit (Ping timeout: 244 seconds)
16:01:46*rockcavera quit (Remote host closed the connection)
16:03:53om3gaFinally excluded "possible bug" in nim . but still strange behavior. Now binary not causes UB, but strange thing, one function from shared lib don't works.
16:04:32om3gaplease ignore posted above debug log
16:05:47FromDiscord<Ayy Lmao> Is there a way to tell a template that it's okay to not put `gensym` after everything?
16:07:27FromDiscord<Yardanico> it's not putting "gensym", it's just making fresh symbols, but you can get what you want with {.dirty.}
16:07:52FromDiscord<Yardanico> by default template are hygienic, with `{.dirty.}` however all identifiers will be kept as-is
16:09:24FromDiscord<Ayy Lmao> In reply to @Yardanico "by default template are": Awesome, I'll have to try it out. My use case is for generating top level functions with a template. If you get something wrong somewhere else, then the compiler's error message is spammed with `gensym` in all the arguments which is ugly.
16:09:54FromDiscord<Yardanico> eh, it's not really that ugly, and instead you can use `{.inject.}` for specific parts that you dont want to get gensym'd
16:11:06FromDiscord<Ayy Lmao> I hadn't thought of inject. I'll have to try that too. For some reason my eyes glaze over when I'm greeted with an error message where half of the content is `gensym`
16:22:57*wallabra quit (Quit: ZNC 1.8.2 - https://znc.in - Stopping for maintenance... Leave messages at my XMPP ([email protected]), or my Discord (Gustavo6046#9009), or possibly my Mastodon [email protected]), or email ([email protected]).)
16:34:26FromDiscord<Andreas> how can on pass a (sub)-range to a proc ? `proc (a: seq[byte], ra: range[int])` does not work ?
16:35:08FromDiscord<Andreas> (edit) "on" => "one"
16:36:53FromDiscord<Rika> a "range" is a `Slice[int]`
16:36:55FromDiscord<Rika> i think
16:37:15FromDiscord<Rika> !eval echo (typeof 0..1) == Slice[int]
16:37:17NimBotCompile failed: /usercode/in.nim(1, 20) Error: type mismatch: got <typedesc[int], typedesc[Slice[system.int]]>
16:37:24FromDiscord<Rika> eeh
16:37:33FromDiscord<Rika> i guess i have to value-ize 0..1 somehow idk
16:38:17FromDiscord<spoon> sent a code paste, see https://paste.rs/Mn2
16:38:42FromDiscord<spoon> not sure if it's my options usage or the api usage, but i'm testing by updating roles
16:38:45FromDiscord<Rika> then that means `o` is none
16:39:07FromDiscord<spoon> ah, so it's the api
16:41:39FromDiscord<huantian> !eval echo 0..3 is Slice[int]
16:41:42NimBotfalse
16:41:45FromDiscord<huantian> Wonder does that work
16:41:49FromDiscord<huantian> Nope
16:45:21FromDiscord<demotomohiro> !eval echo typeof(0..3)
16:45:23NimBotint
16:57:46FromDiscord<planetis> !eval echo typeof(0..3, typeOfProc)
16:57:48NimBotHSlice[system.int, system.int]
16:57:58FromDiscord<Rika> oh yeah that thing
16:58:23FromDiscord<planetis> which reminded me, collect needs to be fixed
17:07:26om3gaYardanico, finally fixed everything. The problem was with bindings to struct request, it was incomplete
17:07:50om3gaso the FCGX_Accept_r used to corrupt memory
17:08:35om3gaprobably when I did mappings c2nim ignored something...
17:09:40om3gaor.. I accidentally deleted block of code... crazy
17:30:52*xet7 quit (Remote host closed the connection)
17:33:23*xet7 joined #nim
19:19:53*xet7 quit (Remote host closed the connection)
19:28:26FromDiscord<d4rckh> sent a code paste, see https://play.nim-lang.org/#ix=3YiI
19:28:30FromDiscord<d4rckh> (edit) "https://play.nim-lang.org/#ix=3YiI" => "https://paste.rs/D5h"
19:28:30FromDiscord<d4rckh> I am trying to use `ws` with `jester`
19:37:24FromDiscord<d4rckh> https://media.discordapp.net/attachments/371759389889003532/977656374806859846/unknown.png
19:37:33FromDiscord<d4rckh> for some reason, this ws library is not sending anything back to my ws client
19:37:45FromDiscord<d4rckh> can any of you catch what's wrong?
19:39:35FromDiscord<Rika> dont use sleep
19:39:40FromDiscord<Rika> that will block your async code
19:39:52FromDiscord<Rika> use sleepAsync
19:39:59FromDiscord<Rika> `await sleepAsync(1000)`
19:40:04FromDiscord<d4rckh> ah, thanks
19:40:13FromDiscord<d4rckh> okay, changed asyncCheck to await
19:40:15FromDiscord<d4rckh> now it works
19:40:35FromDiscord<d4rckh> now i want all of those connections to be available in my entire program
19:40:38FromDiscord<d4rckh> (edit) "now i want all of those ... connections" added "ws"
19:40:55FromDiscord<d4rckh> i have this `Server` ref object which is passed around in mostly every proc
19:42:32FromDiscord<d4rckh> can i just make a sequence of WebSockets there?
19:42:58*ltriant joined #nim
19:43:58*redj quit (Ping timeout: 246 seconds)
19:44:36*redj joined #nim
19:47:36*ltriant quit (Ping timeout: 244 seconds)
19:49:28FromDiscord<d4rckh> Okay, I did something
19:49:38FromDiscord<d4rckh> but now i get `Exception message: Missing route action, did you forget to use \`resp\` in your route?`
19:49:44FromDiscord<d4rckh> (edit) "\`resp\`" => "'resp'"
19:50:07FromDiscord<d4rckh> sent a code paste, see https://play.nim-lang.org/#ix=3YiL
19:50:18FromDiscord<d4rckh> (edit) "https://play.nim-lang.org/#ix=3YiL" => "https://play.nim-lang.org/#ix=3YiM"
19:50:24FromDiscord<d4rckh> (edit) "https://play.nim-lang.org/#ix=3YiM" => "https://play.nim-lang.org/#ix=3YiN"
19:52:46*xet7 joined #nim
19:58:43FromDiscord<huantian> gotta respond with something, `resp "success"` or something
19:58:51FromDiscord<huantian> (edit) "gotta respond with something, `resp "success"` ... or" added "at the end"
20:02:11FromDiscord<d4rckh> i see
20:02:13FromDiscord<d4rckh> thanks
20:02:30FromDiscord<d4rckh> now that function sends nothing
20:02:34FromDiscord<d4rckh> (edit) removed "function"
20:02:49FromDiscord<d4rckh> i have that while loop that sends things while the socket is connected
20:02:57FromDiscord<d4rckh> which stops as soon as i try to send something from another file
20:08:28*redj quit (Ping timeout: 246 seconds)
20:09:17FromDiscord<d4rckh> omg i changed from `hello` to `hi`
20:09:22FromDiscord<d4rckh> it worked well
20:09:37FromDiscord<d4rckh> until i restarted the ws server, and now it closes the connection randomly
20:11:04*xet7 quit (Remote host closed the connection)
20:11:06FromDiscord<d4rckh> i didnt change a single line of code
20:24:12FromDiscord<N00nehere> does pas2nim convert stuff like gui?
20:31:28*claudius joined #nim
20:34:07*claudius left #nim (#nim)
20:36:17*xet7 joined #nim
21:50:51*jjido joined #nim
22:13:57*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
22:25:12*ltriant joined #nim
22:29:50*ltriant quit (Ping timeout: 244 seconds)
23:01:22FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3Yjq
23:01:50FromDiscord<Elegantbeef> You know you can write code?
23:01:53FromDiscord<Andreas> there ist a delete( seq, idx)
23:02:13FromDiscord<Andreas> (edit) "there ist a delete( seq, idx) ... " added "in system.."
23:03:08FromDiscord<!Patitotective> In reply to @Elegantbeef "You know you can": you mean the second
23:03:20FromDiscord<Elegantbeef> Nope
23:03:41FromDiscord<!Patitotective> then :[
23:04:15FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Yjr
23:04:48FromDiscord<Elegantbeef> That removes all entires of `val`
23:05:04FromDiscord<!Patitotective> thanks :]
23:09:54FromDiscord<Andreas> In reply to @Patitotective "you mean the second": sry, just checked it - yes second version works for me.. a remove.fn is nice&easy
23:11:04FromDiscord<Andreas> (edit) "nice&easy" => "nice&easy↵Remove first hit of 'b' or all ?"
23:55:30*ltriant joined #nim