<< 17-09-2021 >>

00:00:57FromDiscord<Beans.> Thanks for the help!
00:30:37FromDiscord<impbox [ftsf]> hmm does strscans handle unicode?
00:30:55FromDiscord<Elegantbeef> Kinda
00:31:07FromDiscord<Elegantbeef> If your pattern has unicode it'll work, but it's not unicode awatre
00:31:14FromDiscord<impbox [ftsf]> nods gotcha
00:31:21FromDiscord<impbox [ftsf]> probably not very safe then
00:31:35FromDiscord<Elegantbeef> The only unicode aware module is the `unicode` ones
00:56:06*arkurious quit (Quit: Leaving)
00:58:10*Gustavo6046 quit (Ping timeout: 240 seconds)
01:00:56*Gustavo6046 joined #nim
01:28:28*neurocyte0 joined #nim
01:31:06*neurocyte quit (Ping timeout: 268 seconds)
01:31:06*neurocyte0 is now known as neurocyte
01:44:39*pch_ joined #nim
01:46:17arfyhi. why am I getting the error "cannot evaluate at compile time in the following code snippet?
01:46:24arfy case key.ord
01:46:24arfy of -1: sleep(100)
01:46:24arfy of '1'.ord .. len(devices) + 49:
01:46:58arfycan the case statement not evaulate the lenth of a sequence at compile-time?
01:47:02arfyevaluate
01:47:11FromDiscord<Elegantbeef> well`len(devices)` isnt a constant
01:47:25*pch quit (Ping timeout: 252 seconds)
01:47:36arfythat's what I thought
01:58:19FromDiscord<impbox [ftsf]> sent a code paste, see https://play.nim-lang.org/#ix=3z6y
02:01:00FromDiscord<impbox [ftsf]> ahh file already existed in /tmp/ but owned by another user
02:08:05nrds<Prestige99> Hey impbox, do you use sdl2_nim keycode.nim's key constants?
02:08:12FromDiscord<impbox [ftsf]> yep
02:08:46nrds<Prestige99> I'm attempting to expose `keycode.nim` by exporting it, but get an error about scancode.nim's contants not existing
02:08:50nrds<Prestige99> Familiar with the issue?
02:08:59FromDiscord<impbox [ftsf]> what's the error?
02:09:19nrds<Prestige99> https://github.com/Vladar4/sdl2_nim/blob/master/sdl2_nim/private/keycode.nim#L119 SCANCODE_CAPSLOCK doesn't exist
02:09:28nrds<Prestige99> all SCANCODE_* isn't known
02:10:16FromDiscord<impbox [ftsf]> https://github.com/Vladar4/sdl2_nim/blob/master/sdl2_nim/private/scancode.nim guess you'll need to include this also
02:10:16nrds<Prestige99> Tried exporting keycode and scancode, same issue.. maybe I should just export sdl
02:11:05FromDiscord<impbox [ftsf]> how are you importing them?
02:11:24nrds<Prestige99> sdl2_nim/private/[scancode, keycode] then export scancode, keycode
02:11:35FromDiscord<impbox [ftsf]> yeah import from sdl2_nim not private
02:12:19FromDiscord<impbox [ftsf]> `from sdl2_nim import Scancode, Keycode`
02:12:28FromDiscord<impbox [ftsf]> `export Scancode, Keycode`
02:12:36FromDiscord<impbox [ftsf]> (i think should work)
02:13:11nrds<Prestige99> ah that works, thanks :)
02:57:11nrds<Prestige99> Is there a way to warn about invoking procs without exception handling? Like in the whole project. Been browsing the manual but haven't seen a mention of it
02:58:34FromDiscord<leorize> there's a way to enforce handling, but no warnings mode
02:58:58FromDiscord<leorize> `{. push: raises: [] .}` on top of your module
03:00:56nrds<Prestige99> Hm okay
03:01:30*Gustavo6046 quit (Remote host closed the connection)
03:01:44*Gustavo6046 joined #nim
03:03:54nrds<Prestige99> That's too bad actually, would be a great feature to have
03:16:27*Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in)
03:16:48*Gustavo6046 joined #nim
03:59:56FromDiscord<Rika> Well it is there, it’s just gonna error out instead of warn
04:06:01*supakeen quit (Quit: WeeChat 3.2.1)
04:06:30*supakeen joined #nim
04:24:13arfyhi. is it possible to compile a project as a universal binary on mac OS?
04:28:39FromDiscord<Rika> I remember someone in the forum asking that, maybe search?
04:29:13FromDiscord<Rika> I don’t have the link on hand and I can’t get it
04:29:19arfyyeah, still getting used to the mac toolchain, more used to linux. mac odesn't have ldd! like really?
04:30:09FromDiscord<Rika> That’s strange
04:37:52*ecs quit (Remote host closed the connection)
04:39:08nrds<Prestige99> Hm for OOP, is there an easy way to deal with overriding or casting the constructor of the super type?
04:40:19nrds<Prestige99> e.g. Bar is a ref object of Foo, and I want to override a method. But in order to do this I need to create a new Bar, but don't want to basically copy and paste foo's "constructor" proc
04:40:33FromDiscord<Elegantbeef> https://nimdocs.com/beef331/oopsie/oopsie.html
04:40:42FromDiscord<Elegantbeef> `copy`/`copyas`
04:41:31nrds<Prestige99> ah yes that's exactly it
04:41:58FromDiscord<Elegantbeef> Guess i should have an inline `copy`
04:42:20FromDiscord<Elegantbeef> https://github.com/beef331/oopsie for the repo 😛
04:42:23nrds<R2D299> itHub: 7"Nim oop helper module"
04:42:55nrds<Prestige99> oop really needs some love in Nim
04:44:39nrds<Prestige99> This only seems to copy the fields, hm.. I sort of need to slap the code into this constructor like a template, I think
04:45:19FromDiscord<Elegantbeef> Call the parent constructor then copy fields to this element
04:45:30FromDiscord<leorize> a pattern that might be useful is to write `initT(var T)` procs
04:45:49FromDiscord<leorize> then child types can call `initParent(result[])`
04:46:09nrds<Prestige99> Any examples?
04:46:30nrds<Prestige99> Oh I see what you mean
04:51:15*ecs joined #nim
04:54:53nrds<Prestige99> So it still complains that result is of the subtype, maybe missing something here
04:55:34FromDiscord<impbox [ftsf]> `initParent(result.Parent)`
04:55:59nrds<Prestige99> ohhh nice, thanks
06:36:27*pch_ is now known as pch
07:01:49*tdc joined #nim
07:07:37nrds<Prestige99> Running into an error, game is crashing but there's like 0 helpful info. Any way to output more useful info? https://play.nim-lang.org/#ix=3z7o
07:08:10nrds<Prestige99> Maybe it's something happening with a c lib, so it can't provide much?
07:09:10FromDiscord<Elegantbeef> Most likely
07:20:19*PMunch joined #nim
07:22:50*pch quit (Remote host closed the connection)
07:23:31*pch joined #nim
07:47:32*max22- joined #nim
07:49:55*Gustavo6046 quit (Ping timeout: 252 seconds)
07:50:24*Gustavo6046 joined #nim
07:52:13FromDiscord<impbox [ftsf]> error this should be golf
07:52:47FromDiscord<impbox [ftsf]> prestige, compile with `-d:debug`?
07:53:01FromDiscord<impbox [ftsf]> run it not via nimble, will remove the excess debugging
07:53:09FromDiscord<impbox [ftsf]> (edit) "run it not via nimble, will remove the excess ... debugging" added "nimscript"
07:57:36FromDiscord<Rika> what?
07:57:41FromDiscord<Rika> golf?
08:19:27FromDiscord<impbox [ftsf]> `Error: execution of an external program failed: '/home/avahe/programming/nim/notgolf/bin/notgolf '`
08:56:25PMunchDamn it, why can't Nim import a module only for compile-time use..
08:57:12PMunchI use the `os` module in my macro, but trying to call that macro from a project with --os:any fails because the OS module isn't supported..
08:59:47FromDiscord<Rika> Huh good ping
08:59:50FromDiscord<Rika> Point
09:00:02PMunchAnd is there a staticExec that doesn't include stderr?
09:01:11FromDiscord<haxscramper> no
09:01:17FromDiscord<haxscramper> gorge also squashes everything
09:01:30FromDiscord<haxscramper> there is no way to execute something on compile-time and get stderr and stdout separately
09:01:40PMunch-_-
09:01:41FromDiscord<Elegantbeef> gorge is an alias for staticExec
09:02:26FromDiscord<haxscramper> You are working on the wrapper generator
09:02:30FromDiscord<haxscramper> you need this for wrapper generator\
09:02:31FromDiscord<haxscramper> ?
09:02:36PMunchYup
09:02:40PMunchWell, need is a strong word
09:02:50FromDiscord<haxscramper> Doing some C codegen in the nimcache dir
09:02:51FromDiscord<Elegantbeef> does `when defined(nimVm)` not work for the compile time import?
09:03:00FromDiscord<Rika> Is there a reason gorge combines the out and err
09:03:09FromDiscord<Rika> ignore the extra “the”
09:03:19FromDiscord<fae> i dont understand this https://play.nim-lang.org/#ix=3z7O
09:03:21FromDiscord<haxscramper> because someone wrote it this way
09:03:26FromDiscord<haxscramper> it mease ZERO sense to me
09:03:31FromDiscord<haxscramper> makes\
09:03:37FromDiscord<haxscramper> FFS who even thought about it
09:03:44PMunchBasically I have created a nice program that outputs a JSON definition of the C I give it. then I parse that JSON in Nim and generate Nim code
09:03:55PMunchBut the program will also output warnings on stderr..
09:04:34FromDiscord<haxscramper> https://github.com/nim-lang/Nim/blob/version-1-4/compiler/gorgeimpl.nim#L25
09:05:15FromDiscord<Rika> In reply to @PMunch "But the program will": Maybe put a silent flag I don’t know
09:06:04PMunch@fae, openArray[untyped] isn't available as an openArray on compile-time, it's a NimNode that will represent an openArray[untyped] on runtime
09:06:19FromDiscord<Elegantbeef> Eh the issue is the generated code
09:06:35FromDiscord<Elegantbeef> I mean yea use varargs or similar
09:06:52FromDiscord<Elegantbeef> but the emitted code is doing `for x in []`
09:07:09FromDiscord<Elegantbeef> Which is a compiler error https://play.nim-lang.org/#ix=3z7Q
09:07:29FromDiscord<Elegantbeef> Though it errors in a different spot
09:08:08FromDiscord<Elegantbeef> x in that for loop doesnt have a type which is why it says `empty`
09:08:58FromDiscord<Elegantbeef> Also why the compiler errors at cgen
09:09:56FromDiscord<fae> is there a way to retain the type information of it being a `seq[Hash]`
09:10:15FromDiscord<Elegantbeef> `newLit(hashes)` should work
09:10:35FromDiscord<fae> also, i feel like what I am currently trying to do would be a lot simpler if I could just create an `array[typedesc]` heh
09:10:52FromDiscord<Elegantbeef> `varargs[untyped`
09:10:53FromDiscord<Elegantbeef> `varargs[untyped]`
09:10:54PMunch@ElegantBeef, I can do `when defined(nimVM)` but then my macro doesn't see the module as imported..
09:11:01FromDiscord<Elegantbeef> or `tuple`
09:11:37FromDiscord<Elegantbeef> actually `varargs[typedesc]`
09:12:38FromDiscord<fae> was hoping to be able to pass in multiple lists
09:13:07FromDiscord<Elegantbeef> Then keep the openarray
09:13:10*Vladar joined #nim
09:13:16FromDiscord<Elegantbeef> The issue isnt the open array https://play.nim-lang.org/#ix=3z7T
09:13:32FromDiscord<Elegantbeef> The issue was that you were writting `for x in []`
09:14:29FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=3z7U for example
09:15:20FromDiscord<fae> currently inspecting expand macros of this newlit example, thanks
09:15:45FromDiscord<Elegantbeef> It just emits the code it'd require to manually make it
09:16:13FromDiscord<Elegantbeef> You can encode it into an array if you wanted aswell, though for empties you'd need to do something special
09:17:08FromDiscord<fae> it still fails with an empty array https://play.nim-lang.org/#ix=3z7V
09:21:16FromDiscord<Elegantbeef> The hell it was just working \:D
09:21:47FromDiscord<Elegantbeef> Ah was the `typedesc`
09:22:20FromDiscord<fae> sent a code paste, see https://play.nim-lang.org/#ix=3z81
09:22:30FromDiscord<fae> and just hash at runtime
09:22:35FromDiscord<fae> but i really dont want to use rtti
09:22:41FromDiscord<fae> or the typeinfo module
09:22:53FromDiscord<Elegantbeef> Well this does work https://play.nim-lang.org/#ix=3z82
09:23:17FromDiscord<fae> sweet
09:23:21FromDiscord<fae> tyty
09:23:29FromDiscord<fae> time to go fumble around some more lol
09:23:50FromDiscord<Archion> Hoi
09:24:13FromDiscord<Elegantbeef> Hello
09:25:00FromDiscord<Archion> A
09:25:15FromDiscord<Archion> Why bot?
09:25:20FromDiscord<Elegantbeef> There are 25 other letters you can put together and make a sentence
09:25:27FromDiscord<Elegantbeef> Cause i'm a scary man on matrix
09:26:01FromDiscord<Archion> O_o
09:26:10FromDiscord<Archion> For me its more than 25
09:26:38FromDiscord<Archion> There are á é í ó etc..
09:29:10FromDiscord<haxscramper> Why people are so confused by bridges
09:29:30FromDiscord<Elegantbeef> No the bridge is heavily defended
09:30:08FromDiscord<Elegantbeef> Stargate reference aside it's cause they see `bot` and it's intelligent(well not with me speaking, but you get the point)
09:34:14FromDiscord<fae> If I join irc will I suddenly understand macros
09:34:50FromDiscord<fae> I feel that’s the next logical step
09:34:55FromDiscord<Elegantbeef> Nah you have to make a PR to fix a bug atleast 5 times before this happens
09:35:24FromDiscord<fae> I’ll get right on it 😅
09:36:32FromDiscord<Elegantbeef> Good luck
09:36:38FromDiscord<Elegantbeef> I need sleep so i'm outta here
09:37:39FromDiscord<fae> Night
09:53:16arfyhi all
09:53:33*neurocyte quit (Quit: The Lounge - https://thelounge.chat)
09:58:53*neurocyte0 joined #nim
09:58:53*neurocyte0 quit (Changing host)
09:58:53*neurocyte0 joined #nim
10:02:48*arkanoid quit (Quit: WeeChat 2.8)
10:05:22FromDiscord<SuperHelios> sent a long message, see http://ix.io/3z8i
10:06:52FromDiscord<dom96> Pretty sure it's @Archion asking "why bot" all the time
10:06:58FromDiscord<Archion> Yes
10:07:13FromDiscord<dom96> It's the only way to relay messages between Matrix and Discord (as well as other non-Discord chats)
10:07:58FromDiscord<Archion> And how to use nim?
10:18:00FromDiscord<haxscramper> If you use `fmt""` it is treated as generalized string literal↵(@SuperHelios)
10:18:06FromDiscord<haxscramper> It says so in the documentation for strformat
10:18:14FromDiscord<haxscramper> And so everything is parsed literally
10:18:37FromDiscord<haxscramper> If you need to use escaped string you can use `&"some text\""`
10:20:04FromDiscord<SuperHelios> In reply to @haxscramper "If you use `fmt""`": so is it expected to print a single double quote when 2 of them are used?
10:44:08FromDiscord<haxscramper> yes
10:44:33FromDiscord<haxscramper> https://nim-lang.org/docs/manual.html#lexical-analysis-raw-string-literals
10:44:39FromDiscord<haxscramper> > ↵> To produce a single " within a raw string literal, it has to be doubled\:↵>
11:49:58NimEventerNew thread by QMaster: Might be a bug in compiler, see https://forum.nim-lang.org/t/8435
11:53:08FromDiscord<Rika> i dont know what the hell the code in their snippet does lmfao
11:55:21FromDiscord<Rika> i doubt the bug is in generics, its just the (imo) crazy usage of inheritance
12:02:58*max22- quit (Ping timeout: 268 seconds)
12:03:03FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3z8U
12:03:11FromDiscord<haxscramper> With ` ConnectionStrBool = distinct bool`
12:03:30FromDiscord<haxscramper> Sounds like something weird is going on
12:04:01FromDiscord<Rika> i still feel like it has something to do with the inheritance
12:04:08FromDiscord<Rika> but those shouldnt match each other yeah
12:04:43FromDiscord<haxscramper> ah
12:04:43FromDiscord<haxscramper> he is an idiot yes
12:05:10FromDiscord<haxscramper> well, who could've guessed that he can't debug this pile of execute overloads themselves
12:06:02*supakeen quit (Quit: WeeChat 3.2.1)
12:06:32*supakeen joined #nim
12:07:26FromDiscord<Rika> kinda harsh but okay
12:08:12FromDiscord<haxscramper> well, I minimized the core for them at least
12:08:27FromDiscord<haxscramper> so it kind of cancels out
12:08:49FromDiscord<haxscramper> Just not a big fan of these zero-effort "dump whole code tell me what is wrong" questions
12:09:28FromDiscord<Rika> i mean yeah low effort
12:11:38FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3z8Y
12:11:42FromDiscord<haxscramper> Swapping last two object declarations
12:12:32FromDiscord<Rika> thats funky
12:14:32FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3z90
12:14:36FromDiscord<haxscramper> Also fails
12:15:13FromDiscord<haxscramper> leorize had something similar not too long ago
12:19:11FromDiscord<Goel> sent a code paste, see https://play.nim-lang.org/#ix=3z92
12:19:24FromDiscord<Goel> (edit) "https://play.nim-lang.org/#ix=3z92" => "https://play.nim-lang.org/#ix=3z93"
12:20:00FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3z94
12:20:07FromDiscord<Goel> In a single line
12:20:46FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3z95
12:20:52FromDiscord<Goel> Oh i need one tab, ok thanks
12:21:04FromDiscord<haxscramper> s/one tab/two spaces/
12:36:55*PMunch quit (Quit: Leaving)
12:40:20*arkurious joined #nim
12:53:42*max22- joined #nim
13:52:49*pro joined #nim
13:58:29*tdc quit (Quit: Leaving)
14:51:16FromDiscord<Gumber> Does anyone in here work on or maintain NimGL by any chance?
15:20:22*Gustavo6046 quit (Ping timeout: 252 seconds)
15:33:39FromDiscord<@hjarausch_gitlab-5fa43a7bd73408> sent a code paste, see https://play.nim-lang.org/#ix=3zaD
15:34:43*Gustavo6046 joined #nim
15:39:30FromDiscord<Rika> jesus someone swap the bridge...
15:39:35FromDiscord<Rika> i cant read this
15:42:01FromDiscord<Rika> well i cant help since the example works (as you said)
15:42:08FromDiscord<Rika> that means you removed the offender...
15:42:55*Gustavo6046 quit (Ping timeout: 252 seconds)
15:47:49*Gustavo6046 joined #nim
16:03:55*stkrdknmibalz quit (Ping timeout: 252 seconds)
16:09:28FromDiscord<dom96> In reply to @Rika "jesus someone swap the": yeah, might be time to ask to get FromGitter back nicely
16:09:40FromDiscord<dom96> annoying thing is that Gitter automatically bridged itself to our Matrix channel...
16:09:47FromDiscord<dom96> so we'd have to unlink that
16:10:09FromDiscord<dom96> I don't have time for this kind of bureaucracy
17:08:14FromDiscord<fae> Trying to understand this better, I think I'm missing something subtle about how `result` works
17:08:16FromDiscord<fae> https://play.nim-lang.org/#ix=3zb5
17:10:28FromDiscord<Rika> entity is a ref, refs are nil by default
17:10:55FromDiscord<Rika> need to do `new result` before to initialise
17:11:12FromDiscord<fae> ahh
17:11:17FromDiscord<Rika> in spawn2 `result = Entity()` implicitly makes new
17:11:37FromDiscord<juan_carlos> `new result` because is `ref`.
17:11:40FromDiscord<Rika> yes
17:12:13FromDiscord<fae> tyty
17:12:25FromDiscord<juan_carlos> yw
17:21:16FromDiscord<Rika> 👌
17:30:25*pro left #nim (WeeChat 3.2)
17:30:28*pro joined #nim
17:37:21*vicfred joined #nim
17:51:25*max22- quit (Ping timeout: 260 seconds)
18:12:39FromDiscord<Goel> sent a code paste, see https://play.nim-lang.org/#ix=3zbn
18:13:10FromDiscord<Goel> (edit) "https://play.nim-lang.org/#ix=3zbn" => "https://play.nim-lang.org/#ix=3zbo"
18:16:06FromDiscord<Rika> What do you mean?
18:16:13FromDiscord<Rika> Like the first byte aka the header?
18:16:26FromDiscord<Rika> Or do you mean the first pixel of the PNG?
18:16:27*pro quit (Ping timeout: 265 seconds)
18:17:16FromDiscord<Goel> The content of `encoded` so as it says it should contain the raw bytes, in this case the first raw byte. What i don't understand is the "`string/Seq[T]`
18:17:24FromDiscord<Goel> (edit) "content" => "contents"
18:17:25FromDiscord<Yardanico> In reply to @Goel "How can i read": wait why are you encoding png after loading it?
18:17:29FromDiscord<Rika> Yeah
18:17:51FromDiscord<Yardanico> loadPNG32 already gives you a PNG
18:17:55FromDiscord<Rika> The pixel is in “png.data” the first entry (“[0]”)
18:18:21FromDiscord<Rika> Though
18:18:46FromDiscord<Rika> There are two pixels if the PNG is 4bpp and so on
18:18:51FromDiscord<Goel> for example i wanted to do like `echo encoded[0]` to read the first raw byte
18:19:01FromDiscord<Rika> Raw byte??
18:19:03FromDiscord<Rika> As in the header
18:19:08FromDiscord<Rika> Like the png header
18:19:14FromDiscord<Rika> Why?
18:19:26FromDiscord<Yardanico> In reply to @Goel "for example i wanted": if you just want to read the first byte, then you don't have to load it as PNG
18:19:29FromDiscord<Yardanico> just read the first byte of the file
18:26:10*crem quit (Ping timeout: 260 seconds)
18:26:27*crem joined #nim
18:27:49FromDiscord<Goel> Ok done thanks, and now if i get it right (probably not) if i read data from `echo repr png.data[0]` this should be the first byte?
18:30:47*nrds quit (Remote host closed the connection)
18:33:00*nrds joined #nim
18:35:23FromDiscord<Rika> Of the image itself
18:40:20FromDiscord<Goel> I'm not doing it right, reading all data from png.data gives me all `char = 255`
18:49:42FromDiscord<Rika> Is your image white
19:12:02FromDiscord<Goel> Nope, its not
19:12:31FromDiscord<Smarc> Is there a way to play .ogg files in nim? The ogg nimble package gives me a 404
19:12:53*stkrdknmibalz joined #nim
19:23:12FromDiscord<Alea> do you always have to do Vector2(x: num, y: num)?
19:23:23FromDiscord<Alea> I'd love to do without the x y labels
19:24:02nrds<Prestige99> Usually would make something like proc initVector2(x: int, y: int): Vector2 = ...
19:24:20nrds<Prestige99> Then you could let v = initVector2(3, 56)
19:28:30FromDiscord<Alea> A good point
19:29:40*crem quit (Ping timeout: 240 seconds)
19:33:12FromDiscord<Goel> v: Vector2 (0.0, 0.0)↵you don't neet do put the labels
19:33:22FromDiscord<Goel> (edit) "v: Vector2 ... (0.0," added "="
19:51:59*crem joined #nim
19:54:25FromDiscord<Varriount> Zevv: Out of curiosity, what is it about Nim's AST that you find makes it hard to work with?
19:55:00FromDiscord<Varriount> Especially versus a more specific AST?
20:20:47FromDiscord<Rika> In reply to @Goel "v: Vector2 = (0.0,": Only works on tuples
20:20:59arfyhi. is it possible, and/or recommended to recursively call a function from within a try... except block? As part of the except clause
20:22:15FromDiscord<Rika> You can
20:22:36FromDiscord<Rika> There is a recursion limit of course
20:22:44FromDiscord<Rika> Like in most non functionally oriented languages
20:23:24arfyyay. only want to have one code point in this function to set a flag. Try open specified config file. if cannot open, try again with defaults. if defaults don't exist, create new ones.
20:27:53*Vladar quit (Quit: Leaving)
20:38:31*supakeen quit (Remote host closed the connection)
20:38:55*supakeen joined #nim
20:43:44FromDiscord<Smarc> Is there a way to play .ogg files in nim? The ogg nimble package gives me a 404
20:44:25*arfy uses nimbass, but it's not free as in beer.
20:45:22FromDiscord<Smarc> I'd like to play different (small) portions of the .ogg file on different keystrokes, would that be possible (with nimbass)?
20:45:46arfyyes I'm pretty sure nimbass can seek in ogg files.
20:46:17arfyI'm using it myself to essentially, recreate a cart machine.
20:51:49FromDiscord<Smarc> hm, not even the example on the github readme is actually working for me
20:52:05arfywhat platform?
20:52:09FromDiscord<Smarc> sent a code paste, see https://play.nim-lang.org/#ix=3zcb
20:52:12FromDiscord<Smarc> throws me several errors like BASS_Init not known
20:52:17FromDiscord<Smarc> Manjaro
20:52:42arfythis is after nimble install nimbass?
20:52:51FromDiscord<Smarc> yes
20:53:38arfyhmmm
20:53:46FromDiscord<Smarc> sent a code paste, see https://play.nim-lang.org/#ix=3zcc
20:53:57*arfy left #nim (Closing Window)
20:54:07*arfy joined #nim
20:54:36FromDiscord<Elegantbeef> You need two pointers
20:54:48FromDiscord<Elegantbeef> the last two parameters are pointers you're passing `Dword, nil`
20:54:54arfyah.
20:55:08arfyeasy. change the forth argument to nil.
20:55:09FromDiscord<Elegantbeef> Also those casts probably are useless
20:55:17FromDiscord<Elegantbeef> You can just do `Dword(44100)`
20:55:24arfythat format in the example works on windows
20:55:27FromDiscord<Smarc> I actually just c&p the readme example :)
20:55:30FromDiscord<Smarc> ah
20:55:32arfyI have to do the same thing on mac.
20:56:05arfyI don't even bother with the dword. I just use 44100.
20:56:20FromDiscord<Elegantbeef> Yea it's just an alias it's not a distinct
20:56:23FromDiscord<Elegantbeef> Didnt look at the source before i spoke
20:58:11FromDiscord<Smarc> Those docs are .. huge. So how do I play some simple .ogg file?
21:07:28arfyhttps://play.nim-lang.org/#ix=3zcj
21:10:56FromDiscord<Smarc> sent a code paste, see https://play.nim-lang.org/#ix=3zck
21:11:24FromDiscord<Elegantbeef> `cint(device)`
21:11:35arfyoops
21:11:40FromDiscord<Elegantbeef> or `cint(-1)`
21:11:43arfyknew i was forgetting something
21:11:47FromDiscord<Elegantbeef> cmon arfy you're ruining people's lives
21:12:21arfy:P
21:12:35FromDiscord<Smarc> compiles, but does not play any sound :P
21:14:23arfydon't forget to change "test.ogg" to something that actually exists.
21:14:35arfyalso, maybe -1 didn't work for some reason. try 1 for device.
21:16:03FromDiscord<Smarc> sent a code paste, see https://play.nim-lang.org/#ix=3zcm
21:16:17FromDiscord<Smarc> tried both, 1 and -1, but it does not play anything. the .ogg exists in the same directory
21:16:51FromDiscord<Elegantbeef> Anyone got docs for this library?
21:17:37arfyI have the docs of the original library as a chm file
21:19:10arfytry outputting the result of BASS_ErrorGetCode after the call to BASS_Init
21:21:29*xet7 quit (Remote host closed the connection)
21:22:32*xet7 joined #nim
21:23:03FromDiscord<Smarc> outputs 46
21:23:33FromDiscord<Smarc> BASS_ERROR_BUSY
21:23:47arfyprobably means device is in use
21:24:25FromDiscord<Smarc> okay, I figured what blocked it, now the error code is 0
21:24:32FromDiscord<Smarc> which means OK, but still no sound
21:24:52arfybuh? yep, now confused == true
21:25:13FromDiscord<Smarc> okay, a sleep(5000) at the end did the trick!
21:25:29FromDiscord<Smarc> thanks you guys for your help
21:25:39arfyoh... oops yeah that would do it.
21:25:49arfysound starts playing then immediately exits
21:26:31arfyyeah. I really should put a nicer wrapping on this lib. or at least see if authro wants to.
21:26:35arfyauthor
21:26:39FromDiscord<Smarc> I'll be back later to figure out how to play just a little part of the .ogg on keystroke :P
21:27:07arfyillwill will be helpful here.
21:28:24FromDiscord<Smarc> I'll get back to that, gotta go to bed now :) See you guys soon!
21:32:51*supakeen quit (Remote host closed the connection)
21:33:16*supakeen joined #nim
21:33:50arfymy thoughts on nim's stdlib. I like it. it covers all the esentials, not too small or too big. very much like python. system could be a little more modular though
21:36:42FromDiscord<Elegantbeef> Yea the core devs do want to make system smaller and split it up
21:36:51FromDiscord<Elegantbeef> Like `io` being included in system for instance
21:44:46*ozzz quit (Ping timeout: 265 seconds)
22:03:27*ozzz joined #nim
22:07:08*ozzz quit (Read error: Connection reset by peer)
22:10:15*ozzz joined #nim
22:15:50*ozzz quit (Read error: Connection reset by peer)
22:19:41*ozzz joined #nim
22:25:49*ozzz quit (Read error: Connection reset by peer)
22:29:13*ozzz joined #nim
22:43:08*vicfred quit (Quit: Leaving)
22:48:03*max22- joined #nim
23:13:06*perro quit (Remote host closed the connection)
23:13:10*stkrdknmibalz quit (Ping timeout: 260 seconds)
23:45:53NimEventerNew thread by EnteryName: Nim in Action, see https://forum.nim-lang.org/t/8436
23:58:40*max22- quit (Remote host closed the connection)