<< 06-06-2021 >>

00:01:44FromDiscord<System64 ~ Flandre Scarlet> Oh wait↵It works fine but the window's height is just... one
00:03:00FromDiscord<System64 ~ Flandre Scarlet> I can navigate with the keys https://media.discordapp.net/attachments/371759389889003532/850887462632030218/unknown.png
00:04:52FromDiscord<System64 ~ Flandre Scarlet> Ah fixed
00:08:11*Gustavo6046 joined #nim
00:08:14FromDiscord<System64 ~ Flandre Scarlet> but you said I should put an automatic type conversion to cint, but it's not recommended
00:08:44FromDiscord<ElegantBeef> I said if lazy you could but yea
00:09:07FromDiscord<System64 ~ Flandre Scarlet> but I should at least remove the TLN thing
00:10:34FromDiscord<System64 ~ Flandre Scarlet> should I do some other things?
00:15:44FromDiscord<ElegantBeef> I havent looked at the api much so i dont know as of now
00:16:43FromDiscord<System64 ~ Flandre Scarlet> should I make it Object Oriented?
00:18:02FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3oTl
00:19:20FromDiscord<ElegantBeef> In reply to @System64 "should I make it": No need to unless you're using overrides
00:19:43*PMunch quit (Quit: leaving)
00:19:47FromDiscord<System64 ~ Flandre Scarlet> I don't think it's necessary to override Tilengine's procs
00:20:02FromDiscord<codic> looks like I'm gonna just use `recv` and look for null term anyways
00:20:22FromDiscord<ElegantBeef> Exactly why i said it's not needed, OOP isnt a great design paradigm to force on everything, iit should be used when needed
00:21:37FromDiscord<System64 ~ Flandre Scarlet> yeah true↵The problem is I learned programming with OOP↵And when I tried C I was be like "trying to mimic OOP with structs"
00:22:31FromDiscord<System64 ~ Flandre Scarlet> yeah that's stupid I know
00:24:48FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3oTm
00:25:09FromDiscord<codic> issue on newSocket 🤔
00:33:50FromDiscord<ElegantBeef> You are on a unix OS right? 😄
00:35:45FromDiscord<codic> yes, gnu / linux indeed
00:36:32FromDiscord<codic> ok, I needed additional f;ags
00:36:35FromDiscord<System64 ~ Flandre Scarlet> is there a way to make a smaller executable? Just curious
00:36:35FromDiscord<codic> (edit) "f;ags" => "flags"
00:36:42FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3oTp
00:36:44FromDiscord<codic> the defaults are for tcp I think
00:36:51FromDiscord<codic> you can use -d:release
00:37:01FromDiscord<codic> or -d:danger if you are fine with losing some things like runtime bound checking
00:37:08FromDiscord<codic> also `strip` the executable afterwards
00:37:38FromDiscord<System64 ~ Flandre Scarlet> what is runtine bound checking?
00:37:49FromDiscord<ElegantBeef> --opt:size helps and `-d:release` of course
00:39:08FromDiscord<codic> wait apparently d:danger sacrifices compile time bounds checking??
00:39:22FromDiscord<codic> https://media.discordapp.net/attachments/371759389889003532/850896612226367508/unknown.png
00:39:23FromDiscord<ElegantBeef> Doesnt it only sacrifice runtime safeties
00:39:56FromDiscord<System64 ~ Flandre Scarlet> well I should avoid danger
00:42:01FromDiscord<System64 ~ Flandre Scarlet> ah speed is optimized for more efficient executable I guess?
00:45:04FromDiscord<ElegantBeef> Yes it turns on the speed optimizers in the C compiler
00:46:19FromDiscord<System64 ~ Flandre Scarlet> Ah nice I disabled this fcking console lol↵The doc is very clear, that's nice
00:56:47*nphg1 joined #nim
00:58:52*Cthalupa quit (Ping timeout: 272 seconds)
00:59:29*nphg quit (Ping timeout: 258 seconds)
01:05:19*Cthalupa joined #nim
01:06:27FromDiscord<Rika> In reply to @codic "wait apparently d:danger sacrifices": Bug already on tracker
01:13:17*ZoomZoomZoom quit (Ping timeout: 258 seconds)
01:23:06FromDiscord<treeform> Do you guys know if there is a way to open another process kind of like `startProcess` but open it up in its own terminal window? I am making a profiler and I want that process to output into its own window while original window is kept for the profiler output only?
01:35:22FromDiscord<Rainbow Asteroids> I know in some/most terminal emulators, you can specify a command to run instead of the normal shell, but I don't think the way to do that is standard across terminal emulators
01:36:23FromDiscord<treeform> I don't think there is a way to do it with nim stdlib, I think I figured it out you need to use winim and CreateProcess with CREATE_NEW_CONSOLE flag.
01:36:57FromDiscord<treeform> windows only solution though
01:39:59FromDiscord<ElegantBeef> Might be a n XDG solution or similar
01:40:04FromDiscord<ElegantBeef> For unix atleat 😄
01:44:59FromDiscord<Rainbow Asteroids> is there a way to make koch run one specific test instead of a catagory?
01:48:42*arkurious quit (Quit: Leaving)
02:22:41*cvtsi2sd joined #nim
02:23:10*cvtsi2sd quit (Remote host closed the connection)
02:38:03FromDiscord<codic> if the platform is macos the way is probably standardized for the terminal
02:38:14FromDiscord<codic> (edit) "if the platform is macos the way is probably standardized for the ... terminalwhich" added "inbuilt" | "inbuiltterminal ... " added "which is always there"
02:38:30FromDiscord<codic> for other operating systems you probably want a giant case-of for all the emulators
02:43:50FromDiscord<Rika> not gonna be fun lol
02:44:24FromDiscord<ElegantBeef> Easier to just you know ask the user to specify it on linux 😄
02:46:31FromDiscord<ElegantBeef> Use the environment variable `PROFFY_TERM` and profit 😛
02:49:04FromDiscord<Rika> im pretty sure the different terminals need different methods to create a new console
02:53:14*gl joined #nim
02:53:43*gl quit (Remote host closed the connection)
02:53:48FromDiscord<ElegantBeef> Ah true then `PROFFY_TERM_CMD` where they specifiy a pattern and you just replace it
03:00:08FromDiscord<lamersc.com> Out of place, but go has a C ABI, right?
03:00:26FromDiscord<lamersc.com> Because I need to use a go blockchain library in nim if possible
03:03:22FromDiscord<ElegantBeef> It should Nim also does have support for the Go GC
03:03:51*billy02812 joined #nim
03:04:00*billy02812 quit (Remote host closed the connection)
03:07:23FromDiscord<lamersc.com> In reply to @ElegantBeef "It should Nim also": Thank you 😄!
03:24:52FromDiscord<lamersc.com> Okay but we all have to agree @ElegantBeef is awesome for helping us all with our questions 😅
03:25:03FromDiscord<ElegantBeef> Nah he's an asshole
03:25:16FromDiscord<ElegantBeef> Dont encourage him
03:25:16FromDiscord<lamersc.com> Never I time I look back here where he isn’t helping someone 👀
03:25:16FromDiscord<lamersc.com> 😂
03:26:07FromDiscord<ElegantBeef> I havent made someone a macro here for like a week so it's odd
03:26:19FromDiscord<lamersc.com> The macro god
03:26:26FromDiscord<Rika> beef is an asshole, he imposes macros on people who cannot make them yet smh
03:26:33FromDiscord<ElegantBeef> Indeed
03:50:21*spiderstew joined #nim
03:51:17*spiderstew_ quit (Ping timeout: 245 seconds)
03:58:05*NimBot joined #nim
04:19:33*rbolling[m|gr] joined #nim
04:19:39*rbolling[m|gr] quit (Remote host closed the connection)
04:35:14*conkker0 joined #nim
04:36:47*pauwel_k1ak joined #nim
04:37:09*so quit (Ping timeout: 240 seconds)
04:37:09*pauwel_kwak quit (Ping timeout: 240 seconds)
04:37:45*kali_ joined #nim
04:37:54*conkker quit (Read error: Connection reset by peer)
04:37:54*FromDiscord quit (Ping timeout: 265 seconds)
04:37:54*kaliy quit (Ping timeout: 265 seconds)
04:37:54*Prestige quit (Ping timeout: 265 seconds)
04:37:54*conkker0 is now known as conkker
04:38:30*FromDiscord joined #nim
04:38:40*so joined #nim
04:38:42*Prestige joined #nim
04:49:37*fputs joined #nim
04:51:24*fputs_ quit (Ping timeout: 258 seconds)
04:59:01*fputs_ joined #nim
05:01:33*fputs quit (Ping timeout: 248 seconds)
05:08:35ForumUpdaterBotNew Nimble package! hexclock - Hex clock made in SDL and Nim, see https://github.com/RainbowAsteroids/hexclock
05:08:35ForumUpdaterBotNew Nimble package! special_functions - Special mathematical functions in Nim, see https://github.com/ayman-albaz/special-functions
05:42:12FromDiscord<mlokis> when i use `nimprof` my program just crashes with no stacktrace
05:50:54FromDiscord<ElegantBeef> Is it supposed to be used? Thought it was preferred to use a C profiller + `--debugger:native`
05:51:55FromDiscord<mlokis> well it seem that nimprof crashes the program if i use `--threads:on`
05:52:39ForumUpdaterBotNew Nimble package! nimibook - A port of mdbook to nim, see https://github.com/pietroppeter/nimibook
05:53:28FromDiscord<ElegantBeef> I swear if i see another nimble package published shortly i might actually be encouraged to go submit my two libraries 😄
06:00:47FromDiscord<Varriount> In reply to @ElegantBeef "I swear if i": I swear if I find another TOCTOU bug in Nim, I'm going to start ranting.
06:03:30FromDiscord<ElegantBeef> I never even knew that was a thing before now, so cheers
06:03:35FromDiscord<Rainbow Asteroids> what is a toctou
06:04:14FromDiscord<ElegantBeef> Having a delay inbetween a check and usage resulting in ability to abuse that window
06:07:17FromDiscord<Rainbow Asteroids> > In 2004, an impossibility result was published, showing that there was no portable, deterministic technique for avoiding TOCTOU race conditions.[9]↵way to be a downer, wikipedia
06:07:44FromDiscord<ElegantBeef> Just dont accept any inputs from anywhere 😛
06:07:54FromDiscord<Rika> No code
06:07:55FromDiscord<Rainbow Asteroids> In reply to @ElegantBeef "I swear if i": just do it and rake in the github stars ✨
06:07:57FromDiscord<Rika> Easy fix
06:08:41FromDiscord<ElegantBeef> also i picked up a terrible thing from pmunch, i now use `/tmp/` 😄
06:12:14*intj44022 joined #nim
06:12:15*intj44022 quit (Killed (Sigyn (Spam is off topic on freenode.)))
06:13:43FromDiscord<mlokis> How do i pass flags to gcc when compiling?
06:13:51FromDiscord<ElegantBeef> `--passC:`
06:13:57FromDiscord<mlokis> thx
06:17:27FromDiscord<Varriount> In reply to @Rika "Easy fix": Mainly its finding something like this in Nim's codebase:↵ - Oh look, we have a possible http connection! Should we accept it?↵ - Let's check that we haven't allocated all our file descriptors.↵ - Ok, good, now let's accept that connection. Nothing could possibly go wrong!
06:18:09FromDiscord<Varriount> (edit) "http" => "HTTP"
06:18:32FromDiscord<ElegantBeef> Is that fixed just by moving step 2 to 1?
06:18:51FromDiscord<Rika> In reply to @Varriount "Mainly its finding something": You didn’t see the message I sent before that
06:19:14FromDiscord<Varriount> In reply to @ElegantBeef "Is that fixed just": Nope. The solution is not checking at all, and handling the exception.
06:19:19FromDiscord<ElegantBeef> Ah
06:19:48FromDiscord<ElegantBeef> Yea i was trying to leave the three steps in, but still a window inbetween checking and doing
06:20:20FromDiscord<Varriount> In reply to @Rika "You didn’t see the": Hah. You're correct.
06:20:42FromDiscord<ElegantBeef> Well there we go both packages are submitted to the registry 😄
06:20:45FromDiscord<mlokis> sent a code paste, see https://play.nim-lang.org/#ix=3oUF
06:20:53FromDiscord<Rainbow Asteroids> In reply to @Varriount "Mainly its finding something": ~~i'm not a nerd so~~ i wouldn't see how anything could go wrong there
06:21:03FromDiscord<ElegantBeef> nah mlokis just compile with `--debugger:native` then use `callgrind` or similar
06:22:20FromDiscord<mlokis> so `nim c --debugger:native myFile` and then run `some_profiler myFile.exe`?
06:22:40FromDiscord<ElegantBeef> yea
06:23:08FromDiscord<ElegantBeef> Intel and amd have profilers since you arent on linux
06:23:19FromDiscord<Varriount> In reply to @Rainbow Asteroids "~~i'm not a nerd": You have to consider two things:↵ - A program can have multiple threads, and thus may have multiple functions executing in parallel.↵ - Even if a program doesn't explicitly use threads, it's possible to "attach" and run a thread on one process, from another process (debuggers sometimes do this).
06:24:25FromDiscord<Varriount> In reply to @Rainbow Asteroids "~~i'm not a nerd": So it's possible that, between checking the number of used file descriptors, and accepting the connection, another thread may have just allocated a bunch of file descriptors.
06:26:16*khaled28 joined #nim
06:26:27*khaled28 quit (Remote host closed the connection)
06:39:04FromDiscord<mlokis> In reply to @ElegantBeef "Intel and amd have": installing intel prof involves 22GB of data lol, i ll use amd
06:45:18*Guest30173 joined #nim
06:45:23*Guest30173 quit (Remote host closed the connection)
06:49:43*focus-u-f joined #nim
06:49:49*focus-u-f quit (Remote host closed the connection)
06:57:14*osama joined #nim
07:00:56*jgornick joined #nim
07:01:06FromDiscord<mlokis> i em encountering some lag when running the game. Can it be the gc doing it?
07:01:10*jgornick quit (Remote host closed the connection)
07:01:23FromDiscord<ElegantBeef> I wouldnt be worried about the GC
07:01:48FromDiscord<ElegantBeef> Is the game open? I could take a few moments to profile it if it is
07:01:54FromDiscord<Bung> can I use `before test:↵ requires "asynctest >= 0.2.0 & < 0.3.0"` ?
07:02:16FromDiscord<Bung> in nimble
07:03:24FromDiscord<mlokis> In reply to @ElegantBeef "Is the game open?": i used the amd profiler but it did not tell me much
07:04:09FromDiscord<ElegantBeef> Yea i've never used it so no clue what information it provides
07:07:48*Anticimex12 joined #nim
07:08:00*Anticimex12 quit (Remote host closed the connection)
07:13:44*vincentvdk[m]16 joined #nim
07:14:11*vincentvdk[m]16 quit (Remote host closed the connection)
08:12:15*TanoMarcelo joined #nim
08:12:44*TanoMarcelo quit (Remote host closed the connection)
08:21:13*vader-12 joined #nim
08:21:46*vader-12 quit (Remote host closed the connection)
08:23:19*ZoomZoomZoom joined #nim
08:29:16ForumUpdaterBotNew thread by Haxscramper_: Using nim `method` to wrap C++ methods, see https://forum.nim-lang.org/t/8090
08:31:07*Vladar joined #nim
08:34:58*osama quit (Quit: leaving)
08:45:18*komugi12 joined #nim
08:45:31*FisHlaBsoMAN2-t1 joined #nim
08:45:31*FisHlaBsoMAN2-t1 quit (Remote host closed the connection)
08:45:53*komugi12 quit (Remote host closed the connection)
09:18:50*MarderIII joined #nim
09:19:15*amoros11 joined #nim
09:19:18*amoros11 quit (Remote host closed the connection)
09:45:30ForumUpdaterBotNew thread by Zoom: Improving the documentation: Roadmap, community engagement., see https://forum.nim-lang.org/t/8091
09:45:39FromDiscord<Varriount> sent a long message, see https://paste.rs/H1K
09:45:45FromDiscord<haxscramper> @Unaimend you asked about about optional matching in fusion - https://github.com/haxscramper/fusion/commit/73830e45b23dd1733d23e93dbd4bfa761376fb83#diff-a977874b0033ac3f009aaebae6f7d3b5b8abd954fabc7a8856714aa1c1a5a80d
09:56:45*PMunch joined #nim
10:08:55*tane joined #nim
10:32:54*Zardoz joined #nim
10:33:23*Zardoz quit (Remote host closed the connection)
11:07:57*MarderIII quit (Ping timeout: 245 seconds)
11:26:02*rusman[m|gr] joined #nim
11:26:38*rusman[m|gr] quit (Remote host closed the connection)
11:43:50ForumUpdaterBotNew thread by Masiarek2: Mixed bag seq: allow strings and int in a seq, see https://forum.nim-lang.org/t/8092
12:01:08*ZoomZoomZoom quit (Ping timeout: 252 seconds)
12:21:20*arkurious joined #nim
13:10:10*trelane_ joined #nim
13:10:22*trelane_ quit (Remote host closed the connection)
13:10:37*Elijah_ joined #nim
13:11:15*Elijah_ quit (Remote host closed the connection)
13:25:05FromDiscord<Lefl> Does someone know of a way to receive bluetooth low energy messages in nim?↵I'm looking for something like this: https://arduino.stackexchange.com/questions/74935/send-receive-data-from-to-raspberry-pi-to-from-arduino-with-hm-10-bluetooth-le
13:25:32FromDiscord<Lefl> (edit) "https://arduino.stackexchange.com/questions/74935/send-receive-data-from-to-raspberry-pi-to-from-arduino-with-hm-10-bluetooth-le" => "https://arduino.stackexchange.com/a/74939 (Python using bluepy)"
13:26:26*aeverr joined #nim
13:31:33*MarderIII joined #nim
13:40:42FromDiscord<Bung> haven't seen one, what platform you program will run ?
13:41:43*spiderstew quit (Quit: ZNC 1.7.2+deb3 - https://znc.in)
13:41:49ZevvPMunch: would you be interested to inherit nim arduino from me?
13:43:02Zevvi dont feel like supporting it because Im not actually using it.
13:44:44*spiderstew joined #nim
13:44:59PMunchHmm, I haven't actually used it any myself Zevv. How much maintenance does it require?
13:46:17Zevva bit every now and then. I think some people still find it every now and then, I got a mail the other day of someone who tried for hours to get makefiles running by hand and gave up. found nim arduino and it just worked for him.
13:46:31Zevvso it might be worth keeping it alive and up to date for publicity purposes
13:46:43Zevvand something to point to when deep embedded comes up.
13:47:11Zevvbut it's half baked. The infra works, but there's hardly any FFI in place for avr-libc or hadware headers
13:48:22FromDiscord<Lefl> In reply to @Bung "haven't seen one, what": Linux, on a raspberry pi
13:48:29PMunchI'm kinda working on that myself, wrapping the AVR stuff
13:48:38Zevvnatural fit, I say
13:49:10PMunchAnd I agree that we should keep it around for publicity reasons.
13:49:30Zevvthe project itself is nearly nothing, it is only a toolchain wrapper. arduino IDE thinks its calling the c compiler, but I lie and call nim instead.
13:50:08PMunchYeah I remember you telling me about it during the last physical FOSDEM :)
13:52:26PMunchI'm still in awe that you actually made it work
13:54:36FromDiscord<Lefl> Hmm I could have a python service receive BLE messages write them into a DB (which I'll do anyway) and read them from the nim side
13:57:20FromDiscord<Lefl> I also could try nimbluez but that's hardly documented and I'm unsure if it supports BLE
13:58:52PMunchI guess the handling of BLE would be implemented in libbluetooth which it wraps
13:59:41*francjp[m]4 joined #nim
14:00:01*francjp[m]4 quit (Remote host closed the connection)
14:11:15*spiderstew quit (Quit: ZNC 1.7.2+deb3 - https://znc.in)
14:11:29*spiderstew joined #nim
14:16:45*man_in_shack19 joined #nim
14:17:09*man_in_shack19 quit (Remote host closed the connection)
14:20:41FromDiscord<dom96> In reply to @Lefl "Does someone know of": What device are you targeting?
14:20:58FromDiscord<Lefl> A raspberry pi is going to receive the messages
14:21:08FromDiscord<Lefl> An Arduino with a HM-10 is going to send them
14:21:36FromDiscord<dom96> Can’t you just wrap the standard C arduino libraries and use them?
14:22:10FromDiscord<dom96> For the RPi I’m sure there is Bluetooth libraries you can wrap too (or they may already be wrapped for you)
14:24:22FromDiscord<Lefl> In reply to @dom96 "Can’t you just wrap": I don't want to program the arudino in nim
14:24:36FromDiscord<Lefl> But yeah, I might need to look around for ble libraries
14:25:49*tomh7 joined #nim
14:25:59*tomh7 quit (Remote host closed the connection)
14:29:00FromDiscord<haxscramper> @dom96 can you remove "Moderated" status on my @haxscramper account on nim forum?
14:29:32*MarderIII quit (Quit: Leaving)
14:29:48FromDiscord<haxscramper> It says account must be verified by some of the admins so
14:30:57FromDiscord<dom96> @haxscramper done
14:33:48FromDiscord<dom96> In reply to @Varriount "Araq or <@413679055897100289> or": @Varriount is this related to https://github.com/nim-lang/Nim/issues/18161#issuecomment-855341288?
14:35:14*icerider2-m6 joined #nim
14:35:36*icerider2-m6 quit (Remote host closed the connection)
14:37:13*Guest6044 joined #nim
14:37:22*Guest6044 quit (Remote host closed the connection)
14:40:50*liiwi15 joined #nim
14:41:07*liiwi15 quit (Remote host closed the connection)
14:48:30FromDiscord<mlokis> have anyone tested if casts like `cast[(float32, float32)](vectorObject)` have any performance cost? I assume its more a syntax for us to denote what is intended and compiler does not treat this as operation that would get into executable.
14:49:24FromDiscord<Bung> it only for pass compiler if am understood right
14:49:52*weego joined #nim
14:50:22*weego quit (Remote host closed the connection)
14:53:56*billstclair16 joined #nim
14:54:06*billstclair16 quit (Remote host closed the connection)
14:59:14FromDiscord<haxscramper> In reply to @dom96 "<@!608382355454951435> done": Thanks
15:00:09FromDiscord<haxscramper> And I just found out that I can use the same email twice if I have leading space. So ` haxscramper@ ...` and `haxscramper@ ...` are both valid but different
15:00:25FromDiscord<haxscramper> But confirmation email is sent to the same email, but gravatar does not work
15:00:31FromDiscord<haxscramper> (edit) "But confirmation" => "Confirmation"
15:00:37FromDiscord<Rika> ~~google also has the period quirk~~
15:02:01FromDiscord<haxscramper> Well, surprisingly enough it works fine for the most part, though not being able to set avatar is kind of annoying. Certainly not the end of the world though
15:04:06*itsnotgoodname2 joined #nim
15:04:37*itsnotgoodname2 quit (Remote host closed the connection)
15:05:25FromDiscord<dom96> You can also use `haxscramper+foobar@` if you use gmail. Spaces might be a worthwhile thing to detect though
15:10:26FromDiscord<haxscramper> So you mean I can change ` haxscramper` to `haxscramper+xxx` and it would be considered as the same email?
15:10:51FromDiscord<haxscramper> When sending confirmation messages etc.
15:20:07*parataxia joined #nim
15:20:43*parataxia quit (Remote host closed the connection)
15:33:26FromDiscord<dom96> gmail considers it the same
15:33:29FromDiscord<dom96> most web apps don't
15:33:34FromDiscord<dom96> (and that's a good thing)
15:37:34ForumUpdaterBotNew Nimble package! kashae - Calculation caching library, see https://github.com/beef331/kashae
15:37:35ForumUpdaterBotNew Nimble package! sumtypes - Simple variant generator empowering easy heterogeneous type operations, see https://github.com/beef331/sumtypes
15:56:32*chesty joined #nim
15:56:34*chesty is now known as Guest37379
15:56:47*Guest37379 quit (Killed (Sigyn (Spam is off topic on freenode.)))
15:56:59FromDiscord<Lefl> Hmm I think I'll have a python service for now
15:57:19FromDiscord<Lefl> Wrapping stuff seems complicated, or at least more complicated than I'm willing to understand right now lol
16:08:15*topaxi joined #nim
16:08:46*topaxi quit (Killed (Sigyn (Spam is off topic on freenode.)))
16:13:40*SebastianM joined #nim
16:17:48*disruptek joined #nim
16:34:36*SebastianM quit (Quit: -a- Bye Bye)
16:43:04FromDiscord<tinygiant> sent a code paste, see https://play.nim-lang.org/#ix=3oXa
16:43:47FromDiscord<tinygiant> (edit)
16:44:01FromDiscord<tinygiant> (edit)
16:44:26FromDiscord<tinygiant> (edit) "https://paste.rs/Pt4" => "https://play.nim-lang.org/#ix=3oXb"
16:53:16FromDiscord<tinygiant> sent a code paste, see https://play.nim-lang.org/#ix=3oX3
16:55:06FromGitter<bung87> how nimble execute the .nimble script and inject procs?
17:01:09FromDiscord<haxscramper> It generates nimscript file and runs it
17:05:11FromGitter<bung87> so it scan meta info , prepend procs to new nimscript file and call nim e ?
17:05:34FromDiscord<tinygiant> sent a code paste, see https://play.nim-lang.org/#ix=3oXj
17:05:51FromDiscord<tinygiant> (edit) "https://play.nim-lang.org/#ix=3oXj" => "https://play.nim-lang.org/#ix=3oXk"
17:05:58FromDiscord<tinygiant> (edit) "https://play.nim-lang.org/#ix=3oXk" => "https://play.nim-lang.org/#ix=3oXl"
17:06:10FromDiscord<tinygiant> (edit)
17:07:24FromGitter<bung87> am thinking create new package replace nimble, if i deps on some libs the package wouldn't be much code locs I think.
17:10:21*Oddmonge1 left #nim (#nim)
17:12:01FromDiscord<haxscramper> In reply to @bung87 "so it scan meta": It generates procs, runs nimscript and then parses resulting metainfo
17:12:23FromDiscord<haxscramper> `author = "haxscramper"` is also handled using `var author: string` defined elsewhere
17:12:53FromDiscord<haxscramper> Though to get metainfo it is not strictly necessary to even evaluate nimscript, can be done only using parser
17:14:03FromGitter<bung87> ah, thanks! get it ,it store as variable.
17:14:10FromDiscord<haxscramper> https://github.com/haxscramper/hnimast/blob/af474a41bbc0ff4619d2db81027de0499cb3f218/src/hnimast/compiler_aux.nim#L347
17:16:59FromGitter<bung87> why this in compiler level ?
17:17:45FromDiscord<haxscramper> Because it requires accessing AST of the `.nimble` configuration
17:18:02FromDiscord<haxscramper> This is much faster compared to running nimscript
17:18:32*xet7 quit (Remote host closed the connection)
17:18:49FromGitter<bung87> whre you get PNode , use compiler package ?
17:19:32*xet7 joined #nim
17:20:07FromDiscord<haxscramper> https://github.com/haxscramper/hnimast/blob/af474a41bbc0ff4619d2db81027de0499cb3f218/src/hnimast/compiler_aux.nim#L525
17:21:14FromGitter<bung87> oh, I see `pnode_parse.nim` , neat
17:22:53FromDiscord<haxscramper> Though it would be possible to evaluate nimscript using embedded VM instance, but that would not make any noticeable difference compared to saving file and running it as `nim e`
17:23:53FromDiscord<haxscramper> In my experience using ast unparser is sufficient, and only fails in cases that make zero sense anyway, like `version = CompileDate.replace("-", ".")`
17:25:16FromDiscord<mlokis> sent a code paste, see https://play.nim-lang.org/#ix=3oXr
17:25:47FromDiscord<haxscramper> Are these two lines directly adjacent to each other?
17:27:06FromDiscord<mlokis> yes
17:28:48FromDiscord<mlokis> today i em dealing with one anomaly after another, for example nim is not willing to copy memory if it is in form of `Rectangle`(raylib) ported from c code
17:28:56FromGitter<bung87> @haxscramper why that fails ? I feel bit confusing your project does not seems related to nimble package, it's all about ast right ?
17:29:44FromDiscord<mlokis> In reply to @mlokis "today i em dealing": that happens when i use the Rectangle in my own structure
17:30:18FromGitter<haxscramper> @bung87 no, there are several other helper procedures related to nimble package management, all in `compiler_aux`
17:30:44FromDiscord<mlokis> found another one:
17:30:46FromGitter<haxscramper> Basically I've implemented missing parts for nimble API, so I can actually get some external tool to work with packages
17:31:00FromDiscord<mlokis> sent a code paste, see https://play.nim-lang.org/#ix=3oXt
17:31:30FromDiscord<mlokis> (edit) "https://play.nim-lang.org/#ix=3oXt" => "https://play.nim-lang.org/#ix=3oXu"
17:32:15FromGitter<haxscramper> Instead of trying to figure out how nimble works internally, or getting list of dependencies without nimble trying to install things
17:32:21FromGitter<bung87> looks like you use package info to build project graph
17:33:14FromDiscord<mlokis> this duplicate instruction is actually pretty common
17:33:16FromGitter<haxscramper> Not really, here I just copied nimble dependency resolution "algorithm" and removed hardcoded package installation parts
17:33:30FromGitter<haxscramper> I'm not writing a package manager so I only need as much information as nimble can provide
17:33:54FromGitter<haxscramper> Though for `haxdoc` I do use this info when I need to construct graphviz for import/package dependencies etc.
17:35:21FromGitter<haxscramper> But I think it would not be particularly hard to convert this info to graph and perform resolution using adequate algorithm
17:35:31FromGitter<bung87> ah, seems that project also useful to me
17:36:40*zsoltiv joined #nim
17:37:21FromGitter<haxscramper> Also see https://github.com/disruptek/ups and https://github.com/nim-lang/nimble/issues/890
17:42:30FromGitter<bung87> I dont understand the ups is for what, the issue I'v seen and read through, it's a meta problem for a package manager , also it lack of scope dependencies
17:43:15FromGitter<haxscramper> With current `hnimast` API it is sufficient to `findPackage("hmisc", newVRAny()).get().projectFile().resolveNImbleDeps(nimbleSearchDir()).fromMinimal()` to get information about full dependencies of the project
17:44:07FromGitter<haxscramper> And that's about it - `hnimast` is not designed to provide any API over that, but feel free to copy parts of the implementation as you see fit
17:44:57FromGitter<bung87> so put every `requires` will resolve a nimble dependencies ?
17:46:18FromGitter<haxscramper> Well, with current nimble implementation the answer seems to be "yes", because `requires` statements are processed in order of encouter
17:47:31FromGitter<bung87> seems not be so , it solve one package will conflicts with another package's dependencies
17:48:02FromGitter<haxscramper> https://github.com/nim-lang/nimble/blob/95e6870f60655e81ff488779c7f589fe649061ec/src/nimble.nim#L64
17:48:07FromGitter<bung87> unless you put all requires into returns whole list
17:48:24FromGitter<haxscramper> Nimble parses package, reads it's `requires`, resolves them
17:48:43FromGitter<haxscramper> if it finds dependency it resolves it's requires recursively
17:49:33FromGitter<haxscramper> If any package is encountered more than once it will repeat parsing. for haxdoc I'm getting up to 31 repeated "requirement is already satisfied" for a package because of that
17:50:54FromDiscord<mlokis> okey this one is really good. when i remove print statement, the program does not crash
17:50:56FromGitter<bung87> it shouldn't solve it one by one , the behavior expected to be like other package manager
17:51:15FromGitter<haxscramper> And from time to time it is getting stuck on version resolution stage, so "one package will conflicts with another package's dependencies" seems to be ... I'm not going to say that this is true since I'm not sure mysefl, but evidence shows it works this way right now
17:52:06FromGitter<haxscramper> > it shouldn't solve it one by one , the behavior expected to be like other package manager ⏎ ⏎ Yes, I agree it should
17:52:43FromGitter<bung87> atleast it should not verify every time your nimble task execute
17:53:57FromGitter<bung87> compare to other language package manager seems to be just time wasting
17:54:43FromGitter<haxscramper> It should try to resolve graph using whatever is installed locally and then reach for remote repository if needed
17:55:17FromGitter<haxscramper> The problem is - nimble is decentralized, while `cargo`, `npm`, `aur` etc. are centralized, so it is easier to get full dependency graph
17:56:10FromGitter<bung87> that's another problem, first the nimble's problem need to be solved, then make a centralized registry
17:56:47FromGitter<bung87> all these will save much time
17:58:11FromGitter<bung87> centralized packages , frozen a compressed package , use cdn that will speed up package installation.
17:58:16FromGitter<haxscramper> Someone must implement this, but generally speaking I agree
17:59:31FromGitter<haxscramper> Large portion of the nimble's shortcomings are purely ergnonomic ones, like insanely noisy and useless output, lack of API for external tools
18:00:15FromGitter<haxscramper> Eager package installation algorithm without graph construction even when all elements are available locally
18:00:33FromGitter<haxscramper> But that has been discussed back and forth for as long as I'm here basically
18:01:34FromGitter<bung87> guess because it's done very earlier, dom have no time for nimble .
18:05:03FromGitter<haxscramper> Someone else can do this, it does not have to be don
18:05:45FromGitter<haxscramper> The nimble is open-source, so it is only a matter of RFC + implementation
18:10:16FromGitter<haxscramper> (https://files.gitter.im/5602f03e0fc9f982beb19f61/Vnid/image.png)
18:13:33FromGitter<bung87> I think it’s very clear now just haven’t been done
18:21:10*tane quit (Quit: Leaving)
18:33:01*planetis[m] joined #nim
18:45:48FromDiscord<mlokis> do you think its worth a attempt to fix a bug in compiler?
18:47:39PrestigeIt would probably be very rewarding on a personal level at least
18:48:34FromDiscord<mlokis> well. Now that i have motivation, today i found several bugs and wasted lot of time
18:48:45FromDiscord<Randall> sent a code paste, see https://play.nim-lang.org/#ix=3oXX
18:49:15PrestigeIs there a more ergonomic way of doing an optional callback like https://play.nim-lang.org/#ix=3oXV ?
18:51:49FromDiscord<haxscramper> I supposed you can overload `()`
18:51:52*mbrownnyc4 joined #nim
18:51:56*mbrownnyc4 quit (Remote host closed the connection)
18:52:08FromDiscord<konsumlamm> In reply to @Randall "I have the following:": you didn't supply an argument to `tokenizer.state`
18:52:10FromDiscord<Randall> procs can be `nil`, so the following compiles:↵{.nimcall.}
18:52:18FromDiscord<Randall> (edit) "compiles:↵{.nimcall.}" => "compiles:↵https://play.nim-lang.org/#ix=3oXZ"
18:52:38FromDiscord<Randall> In reply to @konsumlamm "you didn't supply an": Ah thanks, completely blinded me
18:53:29FromDiscord<Randall> (edit)
18:55:44Prestigeoh neat, I didn't know procs could be nil
18:56:21*ExtraDosages[m] joined #nim
18:56:40FromDiscord<Randall> https://nim-lang.github.io/Nim/manual.html#types-procedural-type
18:58:54FromGitter<bung87> @mlokis I suggest create a issue first , see others thoughts
19:19:03FromDiscord<mlokis> sent a code paste, see https://play.nim-lang.org/#ix=3oY7
19:19:35FromDiscord<mlokis> yields `@[538976288, 538976288, 8224, 0, 4, 0, 5237056, 0, 4, 0]`
19:20:41FromDiscord<mlokis> sent a code paste, see https://play.nim-lang.org/#ix=3oY9
19:20:48FromDiscord<mlokis> the statement is not even reached
19:21:27FromDiscord<mlokis> because state of ids is `@[]`
19:22:40FromDiscord<mlokis> it makes no sense
19:32:37FromDiscord<System64 ~ Flandre Scarlet> Is there a chiptune player lib for Nim please?
19:35:39FromDiscord<System64 ~ Flandre Scarlet> does c2nim supports C++?
19:36:02FromDiscord<haxscramper> partially
19:36:08FromDiscord<hotdog> @System64 ~ Flandre Scarlet I think Araq recently said it is planned to improve
19:36:54FromDiscord<System64 ~ Flandre Scarlet> Ah I see, 'cause I try to make a binding for libgme too
19:37:13FromDiscord<hotdog> This is the comment I was thinking of - https://forum.nim-lang.org/t/8020#51549
19:37:53FromDiscord<hotdog> “c2nim now supports most of C++11, except variadiac templates.” &↵“I will add C++20 support, eventually.”
19:38:11FromDiscord<hotdog> Slightly different than I remembered
19:38:14FromDiscord<System64 ~ Flandre Scarlet> alright so I guess it will be fine for the header
19:38:26FromDiscord<System64 ~ Flandre Scarlet> https://github.com/mcfiredrill/libgme/blob/master/player/Music_Player.h↵This is what I need to c2nim
19:39:07FromDiscord<hotdog> Looks pretty straightforward. Give it a go 🙂
19:43:05FromDiscord<System64 ~ Flandre Scarlet> well it didn't happened very well https://media.discordapp.net/attachments/371759389889003532/851184438933979146/libgme.nim
19:45:26PrestigeI might just be doing something silly here but I'm getting an internal error: https://play.nim-lang.org/#ix=3oYs compiler bug?
19:46:33FromDiscord<hotdog> @System64 ~ Flandre Scarlet if c2nim can’t handle it you might just wanna do it by hand, the header isn’t too large
19:46:50FromDiscord<System64 ~ Flandre Scarlet> yeah, should be easy
19:48:39*zsoltiv quit (Quit: zsoltiv)
19:48:47FromDiscord<Recruit_main707> i should ask, did you use the cpp flag?
19:49:07*zsoltiv joined #nim
19:49:24*zsoltiv quit (Client Quit)
19:49:42*zsoltiv joined #nim
19:50:02*zsoltiv quit (Client Quit)
19:51:27FromDiscord<System64 ~ Flandre Scarlet> ah no
19:52:04FromDiscord<System64 ~ Flandre Scarlet> aaaah it works!
20:08:43*citizenrich[m|gr joined #nim
20:09:13*citizenrich[m|gr quit (Remote host closed the connection)
20:13:03FromDiscord<Unaimend> In reply to @haxscramper "<@!287576619718279178> you asked about": Thank you
20:16:43FromDiscord<System64 ~ Flandre Scarlet> How can I convert the string to ptr char please? https://media.discordapp.net/attachments/371759389889003532/851192902787792896/unknown.png
20:18:02FromDiscord<haxscramper> `char` should be wrapped as cstring, and you can use `”normal string".cstring then
20:18:24FromDiscord<haxscramper> (edit) "cstring," => "`cstring`," | "string".cstring" => "string".cstring`"
20:20:32FromDiscord<System64 ~ Flandre Scarlet> it's const char path [] in the C header
20:22:02FromDiscord<Recruit_main707> it might work, if it doesnt, you will have to convert it to a `ptr UncheckedArray[char]` then i think, not sure if you can directly cast it
20:23:06FromDiscord<Recruit_main707> in other words:↵`cast[ptr UncheckedArray[char]]("a_string".cstring)`↵may or may not work, dont remember now
20:23:40FromDiscord<Recruit_main707> it seems to work
20:24:59FromDiscord<Recruit_main707> EDIT: https://play.nim-lang.org/#ix=3oYJ you dont even need the .cstring apparently
20:25:12FromDiscord<haxscramper> In reply to @System64 "it's const char path": IIRC it is he same as const chat pointer
20:25:36FromDiscord<haxscramper> Function expects single string so you can safely pass .cstring to it
20:25:57FromDiscord<haxscramper> (edit) "chat" => "char"
20:26:43FromDiscord<Recruit_main707> In reply to @haxscramper "IIRC it is he": yes, the "nim way" would be a `ptr UncheckedArray[char]`, but the compiler apparently safely casts it even without passing `.cstring`
20:28:52FromDiscord<System64 ~ Flandre Scarlet> WTF https://media.discordapp.net/attachments/371759389889003532/851195961749274694/unknown.png
20:28:55FromDiscord<haxscramper> I'm not sure about whether it is "the nim way", but handling of strings in C interop is always annoying, mainly because C itself hardly knows if it is a string, array or pointer to a character
20:30:10FromDiscord<haxscramper> In reply to @System64 "WTF": It requires pointer to cshort. Make a 'var' and then pass it via 'addr'
20:31:00FromDiscord<haxscramper> `var valueToMutate: cshort = 2`, and then `addr valueToMutate`
20:31:37FromDiscord<System64 ~ Flandre Scarlet> Okay I'll try to compile now
20:32:34FromDiscord<System64 ~ Flandre Scarlet> Aaaaalright my program instant-crash
20:32:52FromDiscord<Recruit_main707> welcome to interop
20:33:04FromDiscord<System64 ~ Flandre Scarlet> that's why I HATE pointers
20:35:08FromDiscord<System64 ~ Flandre Scarlet> it dropped this error https://media.discordapp.net/attachments/371759389889003532/851197539947773952/unknown.png
20:36:21FromDiscord<System64 ~ Flandre Scarlet> Nice problem there https://media.discordapp.net/attachments/371759389889003532/851197846547857439/unknown.png
20:38:35FromDiscord<System64 ~ Flandre Scarlet> can a 64-bits program interop with a 32-bits program?
20:38:50FromDiscord<Recruit_main707> pretty sure they cant
20:39:10FromDiscord<Recruit_main707> you can compile nim to 32bit tho
20:39:48FromDiscord<System64 ~ Flandre Scarlet> If I do, the compiler yells https://media.discordapp.net/attachments/371759389889003532/851198709810724934/unknown.png
20:40:07FromDiscord<Recruit_main707> personally i had to do some weird stuff with my mingw installation because for some reason it didnt want to do it easily, but after manually replacing the compiler, it worked
20:40:24FromDiscord<Recruit_main707> are you sure its 32bit?
20:40:43FromDiscord<System64 ~ Flandre Scarlet> I used this command https://media.discordapp.net/attachments/371759389889003532/851198939470102529/unknown.png
20:40:48FromDiscord<Recruit_main707> those errors are on the nim side, ye
20:40:57FromDiscord<Recruit_main707> its the thing i had to fix
20:42:27FromDiscord<Recruit_main707> you can try replacing the compiler in the mingw installation with the 32 bit version, but its a pain in the ass, thats why i avoid 32bit stuff
20:43:07FromDiscord<Recruit_main707> im always surprised with this, i would expect more people to have this issue, but it only happens to some apparently, specially on windows
20:46:39FromDiscord<System64 ~ Flandre Scarlet> I don't understand why the errors comes from gmeXXType
20:48:55FromDiscord<System64 ~ Flandre Scarlet> I tryed that but illegal https://media.discordapp.net/attachments/371759389889003532/851201007496069160/unknown.png
20:50:33FromDiscord<ElegantBeef> Well yea what'd you expect 😄
20:51:00FromDiscord<System64 ~ Flandre Scarlet> what can I do?
20:55:06FromDiscord<ElegantBeef> I dont know what's going on so cannot say much
20:55:43FromDiscord<System64 ~ Flandre Scarlet> ah alright, thanks anyway
20:56:19FromDiscord<ElegantBeef> What's the header you're wrapping?
20:57:14FromDiscord<System64 ~ Flandre Scarlet> GameMusicEmu, gme.h
20:58:31FromDiscord<System64 ~ Flandre Scarlet> I can't send it now
20:59:37*Vladar quit (Quit: Leaving)
21:01:54FromDiscord<ElegantBeef> Ah `GmeTypeT` should be a `ptr object` just like in the tile engine
21:12:22FromDiscord<Varriount> In reply to @dom96 "<@!169336940846514176> is this related": That's part of it, but it's only one piece from a pile of PRs I've responded to. You could say that's what sent me over the tipping point.
21:30:58*[Terra] joined #nim
21:31:40*[Terra] quit (Remote host closed the connection)
21:37:46*short-bike joined #nim
21:38:09*short-bike quit (Remote host closed the connection)
21:41:52*pox joined #nim
21:42:20*pox quit (Remote host closed the connection)
21:42:36*jxyzn joined #nim
21:42:45*jxyzn quit (Read error: Connection reset by peer)
22:06:19*arkurious quit (Quit: Leaving)
22:17:18*DeX773 joined #nim
22:17:27*DeX773 quit (Remote host closed the connection)
22:18:47*D_ quit (Ping timeout: 245 seconds)
22:27:04*D_ joined #nim
23:14:04FromDiscord<tinygiant> sent a code paste, see https://play.nim-lang.org/#ix=3oZn
23:29:23*PMunch quit (Quit: leaving)
23:30:52*D_ quit (Ping timeout: 245 seconds)
23:31:45*D_ joined #nim
23:39:49*kachink joined #nim
23:40:15*kachink quit (Remote host closed the connection)
23:40:22*fputs_ quit (Ping timeout: 252 seconds)
23:53:13FromDiscord<tinygiant> sent a code paste, see https://play.nim-lang.org/#ix=3oZt