00:01:17 | * | ZoomZoomZoom quit (Ping timeout: 245 seconds) |
00:03:07 | * | ZoomZoomZoom joined #nim |
00:16:07 | * | vsantana joined #nim |
00:16:12 | * | vsantana quit (Quit: Leaving) |
00:16:15 | * | ZoomZoomZoom quit (Ping timeout: 250 seconds) |
00:23:07 | * | fputs quit (Remote host closed the connection) |
00:29:36 | * | johnnynitwits quit (Ping timeout: 240 seconds) |
00:29:37 | * | threenp quit (Ping timeout: 245 seconds) |
00:29:50 | * | chkrde[m] joined #nim |
00:30:26 | * | chkrde[m] quit (Remote host closed the connection) |
00:36:32 | * | ^Q-Master^ quit (Ping timeout: 252 seconds) |
00:47:07 | * | Q-Master joined #nim |
00:55:36 | * | Q-Master quit (Ping timeout: 240 seconds) |
00:55:43 | FromDiscord | <Alea> in these 2 examples:↵https://github.com/Niminem/NNfSiX/blob/master/Nim/p5_ReLU_Activation.nim↵https://github.com/Niminem/NNfSiX/blob/master/C/p005-ReLU-Activation.c↵is nim really that terse compared to C or are the implementations different? |
00:55:55 | FromDiscord | <Alea> 50 vs 280 lines is a big dif |
00:59:33 | FromDiscord | <ElegantBeef> Well the Nim library imports `neo` |
01:00:14 | * | EoflaOE19 joined #nim |
01:00:22 | * | EoflaOE19 quit (Remote host closed the connection) |
01:09:24 | * | Q-Master joined #nim |
01:19:23 | * | Tlangir joined #nim |
01:24:58 | FromDiscord | <k1tt3hk4t> is there any way to write something like "type Foo[I; T = I.T]"? that exactly doesn't compile |
01:25:51 | FromDiscord | <k1tt3hk4t> reason I want this is so that I can have a bunch of types who all have some easily accessible ".T" type, and here Foo is wrapping another such type that has a ".T" so I just want to propagate it upwards |
01:28:59 | * | arkurious quit (Quit: Leaving) |
01:29:55 | FromDiscord | <ElegantBeef> Well do you really need that `T` then if it's inferred from the `I`? |
01:31:00 | FromDiscord | <ElegantBeef> https://play.nim-lang.org/#ix=3ppA |
01:31:31 | FromDiscord | <k1tt3hk4t> the issue is if I'm writing a function that's generic over any of these |
01:31:41 | FromDiscord | <k1tt3hk4t> I want to be able to just say ".T" and get the type they contain |
01:33:46 | FromDiscord | <ElegantBeef> This might work then, can always make a template that takes a `Foo` in this example that does `I.T` https://play.nim-lang.org/#ix=3ppB |
01:34:01 | FromDiscord | <ElegantBeef> Sorry if this is not helpful 😄 |
01:34:07 | FromDiscord | <k1tt3hk4t> I'll try that, sounds like it could work |
01:37:48 | FromDiscord | <k1tt3hk4t> ..actually not sure how to write a template that accepts a specific type itself as an argument rather than a value of that type, I'm now realizing |
01:39:17 | FromDiscord | <ElegantBeef> Does it really need to be a `typedesc` since this is valid https://play.nim-lang.org/#ix=3ppD |
01:40:03 | FromDiscord | <k1tt3hk4t> oh I see, hm |
01:40:28 | FromDiscord | <ElegantBeef> You can only get `I` of a concrete instantiation, since `typedesc[Foo]` could be any generic instantiation |
01:41:09 | FromDiscord | <ElegantBeef> Oh nvm i'm dumb 😄 |
01:41:25 | FromDiscord | <k1tt3hk4t> it seems like the issue with this is it has to take a value |
01:41:33 | FromDiscord | <k1tt3hk4t> so I'd need to manually define this T template for each type |
01:41:42 | FromDiscord | <k1tt3hk4t> rather than it being automatic in the cases where it's already a type parameter |
01:42:53 | FromDiscord | <ElegantBeef> Have a more concrete example? |
01:43:16 | FromDiscord | <k1tt3hk4t> yeah, I'll show my actual code |
01:44:49 | FromDiscord | <k1tt3hk4t> sent a code paste, see https://play.nim-lang.org/#ix=3ppF |
01:45:10 | FromDiscord | <k1tt3hk4t> `Iter[T]` is the result of an iteration step (either yielding a value, skipping the current iteration, or ending the iteration) |
01:45:23 | FromDiscord | <k1tt3hk4t> `SeqIter[T]` is a mutable iterator wrapper over a seq that keeps a counter |
01:45:52 | FromDiscord | <k1tt3hk4t> `FilterIter[I]` keeps a predicate and tests if any step value passes it; if so, it passes it on, otherwise it gives a skip |
01:46:09 | FromDiscord | <k1tt3hk4t> so the issue is for most iterators I could just do `.T` to get the type |
01:46:14 | FromDiscord | <k1tt3hk4t> and this would work with that `iterSeq` function |
01:46:21 | FromDiscord | <k1tt3hk4t> where I try to return `seq[I.T]` |
01:46:30 | FromDiscord | <k1tt3hk4t> that won't work with `FilterIter[I]` though |
01:50:14 | FromDiscord | <ElegantBeef> I dont quite get where the issue looking at that 😄 |
01:50:32 | FromDiscord | <k1tt3hk4t> try calling `iterSeq` on a `FilterIter[SeqIter[int]]` |
01:50:41 | FromDiscord | <k1tt3hk4t> then `I.T` would not exist |
01:50:48 | FromDiscord | <k1tt3hk4t> because `FilterIter` has no type named `T` |
01:51:19 | FromDiscord | <k1tt3hk4t> what I wanted to do was to write something like `type FilterIter[I, T = I.T]` |
01:51:23 | FromDiscord | <k1tt3hk4t> but that gives me an error |
01:53:28 | FromDiscord | <ElegantBeef> Ah give me a moment |
01:54:29 | FromDiscord | <ElegantBeef> Do you have a test i could steal for testing? |
01:54:33 | FromDiscord | <k1tt3hk4t> sure |
01:55:25 | FromDiscord | <k1tt3hk4t> sent a code paste, see https://paste.rs/oz9 |
01:59:14 | * | AlyonaP-t20 joined #nim |
01:59:43 | * | AlyonaP-t20 quit (Remote host closed the connection) |
02:06:29 | FromDiscord | <ElegantBeef> Yea this is an odd problem to solve, probably can use macros which returns `T` if it's one of your iterators otherwise returns the generic |
02:09:20 | FromDiscord | <k1tt3hk4t> yeah I suppose I shouldn't be surprised given that this sort of HKT usage is a bit of an afterthought |
02:09:57 | FromDiscord | <k1tt3hk4t> still fun that other things like map work properly though |
02:11:47 | FromDiscord | <k1tt3hk4t> wait think I may've gotten it |
02:11:56 | * | Q-Master quit (Ping timeout: 258 seconds) |
02:12:04 | * | Q-Master joined #nim |
02:13:06 | FromDiscord | <k1tt3hk4t> sent a code paste, see https://paste.rs/nmJ |
02:13:27 | FromDiscord | <k1tt3hk4t> so it looks like I can just be totally implicit with the fact that `I.T` is the same as `T` in the definition of `FilterIter` and just do it at the proc sites |
02:13:34 | FromDiscord | <ElegantBeef> Ah i was avoiding that cause i figured it was supposed to be inferred from `I` 😄 |
02:13:41 | FromDiscord | <k1tt3hk4t> yeah same |
02:14:01 | FromDiscord | <k1tt3hk4t> (also you might notice I found a bug with my iterSeq impl lol) |
02:15:10 | FromDiscord | <k1tt3hk4t> sent a code paste, see https://play.nim-lang.org/#ix=3ppM |
02:15:53 | FromDiscord | <ElegantBeef> Now you have an ugly functional iterator, so co congrats 😛 |
02:15:59 | FromDiscord | <ElegantBeef> (edit) removed "co" |
02:16:06 | FromDiscord | <k1tt3hk4t> co-congrats lol |
02:17:30 | FromDiscord | <k1tt3hk4t> sent a code paste, see https://play.nim-lang.org/#ix=3ppN |
02:17:33 | FromDiscord | <k1tt3hk4t> it's more like the mutable rust iterators |
02:17:44 | FromDiscord | <ElegantBeef> I meant functional as in procedure called |
02:17:46 | FromDiscord | <k1tt3hk4t> ah |
02:19:13 | FromDiscord | <ElegantBeef> But i can see how you thought i meant the ugly functional stuff aswell 😛 |
02:19:31 | FromDiscord | <k1tt3hk4t> see, this would be a lot prettier if I had associated types or proper HKTs :^P |
02:19:42 | FromDiscord | <k1tt3hk4t> and actual type inference on lambdas |
02:19:57 | FromDiscord | <k1tt3hk4t> writing the easily inferrable `(x: int)` pains me a little bit |
02:20:30 | FromDiscord | <ElegantBeef> Well local inference |
02:20:43 | FromDiscord | <ElegantBeef> It can be stronger |
02:21:41 | FromDiscord | <k1tt3hk4t> I see what you mean actually now thinking about it some |
02:22:00 | FromDiscord | <k1tt3hk4t> since they don't have anything like typeclass constraints to propagate the needs of code outwards, and generics are just sort of like template instantiation |
02:22:41 | FromDiscord | <ElegantBeef> Yea "This is supposed to be a `proc(a: int)` |
02:22:48 | FromDiscord | <ElegantBeef> (edit) "int)`" => "int)`" is clear to see but hard to presently reason about" |
02:23:44 | FromDiscord | <ElegantBeef> Was it you i made that silly macro for generating inferred lambdas? |
02:23:57 | FromDiscord | <k1tt3hk4t> lol I don't think so |
02:24:14 | FromDiscord | <k1tt3hk4t> must be another haskell/ML person |
02:25:49 | FromDiscord | <ElegantBeef> Ah here it is https://play.nim-lang.org/#ix=3o3A |
02:27:35 | FromDiscord | <k1tt3hk4t> lol |
02:30:35 | FromDiscord | <ElegantBeef> Personally i'm more interested in the enum inference cause lambdas are my least favourite feature 😄 |
02:31:28 | FromDiscord | <k1tt3hk4t> :P |
02:37:52 | FromDiscord | <k1tt3hk4t> sent a code paste, see https://play.nim-lang.org/#ix=3ppR |
02:50:35 | * | Tlanger joined #nim |
02:52:48 | * | Tlangir quit (Ping timeout: 240 seconds) |
03:17:05 | * | ower22 joined #nim |
03:17:36 | * | ower22 quit (Remote host closed the connection) |
03:46:38 | * | spiderstew joined #nim |
03:47:32 | * | spiderstew_ quit (Ping timeout: 245 seconds) |
04:08:42 | * | majuscule joined #nim |
04:09:12 | * | majuscule quit (Remote host closed the connection) |
04:30:19 | * | rockcavera quit (Ping timeout: 258 seconds) |
04:30:59 | * | hudsonkelly[m] joined #nim |
04:31:00 | * | luckybunny joined #nim |
04:31:05 | * | hudsonkelly[m] quit (Remote host closed the connection) |
04:31:16 | * | luckybunny is now known as Guest35275 |
04:31:36 | * | Guest35275 quit (Remote host closed the connection) |
04:33:02 | * | n3wborn joined #nim |
04:33:10 | * | n3wborn quit (Remote host closed the connection) |
04:34:27 | * | motersen quit (Remote host closed the connection) |
04:34:53 | * | motersen joined #nim |
04:45:07 | * | cixx27 joined #nim |
04:45:14 | * | xb29 joined #nim |
04:45:31 | * | cixx27 quit (Remote host closed the connection) |
04:45:44 | * | xb29 quit (Remote host closed the connection) |
05:03:33 | * | murb joined #nim |
05:04:00 | * | murb quit (Remote host closed the connection) |
05:07:27 | * | spikebike23 joined #nim |
05:08:04 | * | spikebike23 quit (Remote host closed the connection) |
05:12:21 | * | motersen quit (Remote host closed the connection) |
05:12:33 | * | motersen_ joined #nim |
05:26:01 | FromGitter | <bung87> @ba0f3 are you here? |
05:30:39 | * | narimiran joined #nim |
06:22:28 | * | dtrainor joined #nim |
06:22:41 | * | dtrainor quit (Remote host closed the connection) |
06:25:46 | * | PMunch joined #nim |
06:34:41 | * | Vladar joined #nim |
06:36:07 | PMunch | Prestige, I'm back at work today, which means back to Nimdow :) |
07:04:32 | * | drot joined #nim |
07:04:39 | * | drot quit (Killed (Sigyn (Spam is off topic on freenode.))) |
07:25:21 | PMunch | 200 stars on nimlsp today :) |
07:30:17 | FromGitter | <bung87> wow, what cause it |
07:32:23 | planetis[m] | congrats |
07:32:30 | FromGitter | <bung87> I remenber prologue archive hundreds stars less than a week, he write a thread on hacknews |
07:33:21 | PMunch | I meant it has reached 200 stars, not 200 new stars today :P |
07:34:44 | PMunch | Oh damn, apparently someone has been running their own bot as nickserv on Freenode: https://mobile.twitter.com/plainoldchair/status/1402685764937338881 |
07:39:04 | * | duri joined #nim |
07:39:05 | * | duri is now known as Guest38230 |
07:39:35 | * | Guest38230 quit (Remote host closed the connection) |
07:39:39 | * | PMunch quit (Quit: Leaving) |
07:39:48 | FromGitter | <bung87> okay |
07:40:46 | FromDiscord | <ElegantBeef> Actually getting stars on repos, impossible 😄 |
07:45:14 | FromDiscord | <Rainbow Asteroids> i think the trick is sharing your repos on r/nim or smth |
07:52:05 | FromDiscord | <ElegantBeef> Nah this month with Nim 😄 |
07:55:19 | FromDiscord | <Rainbow Asteroids> never heard of it 😑 |
07:55:33 | FromDiscord | <Rainbow Asteroids> (edit) "😑" => "😐" |
07:55:50 | FromDiscord | <ElegantBeef> It's a monthly post to the Nim blogs section |
07:56:03 | FromDiscord | <ElegantBeef> https://nim-lang.org/blog/2021/06/01/this-month-with-nim.html |
08:04:14 | * | PMunch joined #nim |
08:04:32 | FromDiscord | <Rainbow Asteroids> time to blow minds with my hexclock on this month with nim |
08:04:33 | FromDiscord | <Rainbow Asteroids> https://github.com/RainbowAsteroids/hexclock/raw/master/screenshot.png |
08:06:18 | FromDiscord | <ElegantBeef> lol |
08:09:27 | FromDiscord | <Rika> Post my progress bar library pls smh |
08:12:41 | FromDiscord | <ElegantBeef> Well if you make an issue it can be done |
08:13:05 | FromDiscord | <ElegantBeef> I dont like the premise of adding stuff for people, feels a bit disingenuous |
08:14:06 | FromDiscord | <ElegantBeef> We already have 4 posts including my Sumtypes that some people dont like the named of |
08:14:35 | FromDiscord | <Rika> In reply to @ElegantBeef "*I dont like the": I was joking, I’ll look into the issue |
08:14:41 | FromDiscord | <Rika> Making the issue |
08:15:26 | FromDiscord | <ElegantBeef> Yea i was just saying why i didnt |
08:16:01 | * | forvelin joined #nim |
08:16:14 | * | forvelin quit (Remote host closed the connection) |
08:18:30 | PMunch | @Rainbow Asteroids, now set up a server that serves a web-page that does the same thing ;) |
08:18:45 | PMunch | With an auto-refresh so every second it updates |
08:19:13 | PMunch | "oops, it's quarter to mauve, gotta run" |
08:20:04 | FromDiscord | <Rika> Why a refreshing webpage? You can write JS with Nim so why not a dynamic? |
08:20:25 | PMunch | Fair enough |
08:20:35 | PMunch | Wouldn't even require a server then, just a host |
08:20:49 | FromDiscord | <Rika> Kind of wasteful to refresh everts second |
08:21:00 | FromDiscord | <Rika> Every |
08:23:07 | FromDiscord | <Rainbow Asteroids> write the autorefresh in nim, genius |
08:23:09 | FromDiscord | <ElegantBeef> Kinda have to laugh that you used arc for that clock 😄 |
08:23:19 | FromDiscord | <Rainbow Asteroids> lol |
08:24:08 | FromDiscord | <ElegantBeef> Gotta hit that 144fps otherwise it's an awful clock |
08:24:36 | FromDiscord | <Rainbow Asteroids> the SDL bindings don't even have automatic memory management. first time I used SDL I had a memory leak |
08:25:39 | FromDiscord | <Rika> Nice |
08:26:00 | FromDiscord | <Rainbow Asteroids> my tictactoe game needs 6 GB of memory, don't question it |
08:26:48 | FromDiscord | <ElegantBeef> Ah it also uses 300% of my cpu |
08:26:57 | FromDiscord | <ElegantBeef> How many bitcoins do you get per second? |
08:28:10 | FromDiscord | <Rainbow Asteroids> not enough. shoulda made it do monero instead |
08:29:23 | FromDiscord | <ElegantBeef> Oh is tweens a port of easings.net? |
08:29:38 | FromDiscord | <Rainbow Asteroids> no, some easing functions i wrote |
08:29:52 | FromDiscord | <Rainbow Asteroids> i mean i copied them off of some website, but close enough |
08:30:12 | FromDiscord | <ElegantBeef> Ah, was going to port easting.net when i get some time and patience 😄 |
08:30:26 | PMunch | @ElegantBeef, I've already ported easings.net: https://github.com/PMunch/SDLGamelib/blob/master/gamelib/tween.nim |
08:31:26 | FromDiscord | <ElegantBeef> Ah |
08:31:39 | PMunch | Well, I wrote a tweening implementation that can do arbitrary curves and added the curves from easings.net as options for pre-defined curves :) |
08:45:25 | * | PMunch quit (Quit: Leaving) |
08:46:04 | * | PMunch joined #nim |
09:03:57 | FromDiscord | <System64 ~ Flandre Scarlet> Do you know how can I convert that to nim please? https://media.discordapp.net/attachments/371759389889003532/852473146694041600/unknown.png |
09:10:09 | * | andyrtr joined #nim |
09:10:24 | * | andyrtr quit (Remote host closed the connection) |
09:18:13 | PMunch | @System64, did you try my nodecl suggestion? |
09:33:56 | * | markov[m] joined #nim |
09:34:25 | * | markov[m] quit (Remote host closed the connection) |
09:48:25 | FromDiscord | <System64 ~ Flandre Scarlet> yeah |
09:48:30 | FromDiscord | <System64 ~ Flandre Scarlet> no music |
09:49:35 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=3prn |
09:51:24 | FromDiscord | <System64 ~ Flandre Scarlet> (Doesn't compile on the C side) |
09:57:11 | FromDiscord | <haxscramper> Show the error too |
10:00:59 | * | nukedclx5 joined #nim |
10:01:36 | * | nukedclx5 quit (Remote host closed the connection) |
10:16:58 | * | dqi25 joined #nim |
10:17:05 | * | dqi25 quit (Killed (Sigyn (Spam is off topic on freenode.))) |
10:22:01 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @haxscramper "Show the error too": https://media.discordapp.net/attachments/371759389889003532/852492793318080512/unknown.png |
10:23:18 | FromDiscord | <haxscramper> https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-nodecl-pragma↵`> It tells Nim that it should not generate a declaration for the symbol in the C code.` |
10:23:43 | FromDiscord | <haxscramper> You need to have a `header` as well for the declaration I think |
10:25:07 | PMunch | Wait, so it compiles or it doesn't compile? |
10:25:11 | PMunch | Since you said you got no music |
10:25:12 | FromDiscord | <System64 ~ Flandre Scarlet> the .h thing? |
10:26:22 | FromDiscord | <System64 ~ Flandre Scarlet> yeah but there I changed the code to create an emu, no music + doesn't compile |
10:26:56 | PMunch | Do you have a minimal example in C and its equivalent in Nim where the C version plays sound and the Nim version doesn't? |
10:27:07 | PMunch | If so I can try to run them and figure out what goes wrong |
10:29:16 | FromDiscord | <haxscramper> https://github.com/ShiftMediaProject/game-music-emu/blob/598efca17a97ee4749e671ee51df2a0acefb21fd/demo/basics.c |
10:30:35 | PMunch | Ah never mind, this is a Windows thing? |
10:33:12 | FromDiscord | <haxscramper> I checked their example and it also runs fine on linux, but I got no sound as well |
10:35:29 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @haxscramper "I checked their example": With my binding or the original C code too? |
10:44:55 | FromDiscord | <haxscramper> did you check C code yourself? |
10:53:20 | FromDiscord | <System64 ~ Flandre Scarlet> tried to compile? |
11:07:06 | * | Spr1ng joined #nim |
11:07:23 | * | Spr1ng quit (Remote host closed the connection) |
11:14:08 | * | satori joined #nim |
11:14:36 | * | satori quit (Remote host closed the connection) |
11:15:33 | * | catherinevd[m] joined #nim |
11:15:44 | * | arecaceae quit (Remote host closed the connection) |
11:15:55 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3prI |
11:15:56 | FromDiscord | <haxscramper> It generates correct `out.wav` |
11:15:58 | * | catherinevd[m] quit (Remote host closed the connection) |
11:16:15 | FromDiscord | <haxscramper> For the demo. And also builds correct library version |
11:16:57 | FromDiscord | <haxscramper> Well, not "correct" - there was nothing wrong with it in the first place, but considering your `.dll` does not have required symbols you might want to build it from source |
11:17:39 | FromDiscord | <haxscramper> idk how exactly you are supposed to wrap `extern const` global variables, but your original approach with `importc: gme_ay_type` and `dymlib: "libgme.dll"` seems fine to me |
11:24:47 | FromDiscord | <System64 ~ Flandre Scarlet> I'll try to compile it |
11:24:57 | FromDiscord | <System64 ~ Flandre Scarlet> And does it play music ? |
11:29:44 | * | arkurious joined #nim |
11:34:24 | FromDiscord | <haxscramper> Id won't play any music |
11:34:32 | FromDiscord | <haxscramper> `> C example that opens a game music file and records 10 seconds to "out.wav"` |
11:38:20 | * | Vladar quit (Quit: Leaving) |
11:39:44 | * | FunkyBob joined #nim |
11:39:45 | * | FunkyBob quit (Killed (Sigyn (Spam is off topic on freenode.))) |
11:41:59 | FromGitter | <kaushalmodi> System64: Can you get the original C code to work and get the sound? |
11:48:01 | * | Vladar joined #nim |
11:51:01 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=3prU |
11:52:46 | FromDiscord | <System64 ~ Flandre Scarlet> But I saw an interesting message |
11:53:17 | FromDiscord | <haxscramper> well, i literally just copy-pasted the code again and it generated `out.wav` file |
11:53:48 | FromDiscord | <haxscramper> I'm still not sure why are you so convinced it would play any sound though, because that's not what it says in the example |
11:53:52 | FromDiscord | <haxscramper> comment |
11:54:24 | FromDiscord | <System64 ~ Flandre Scarlet> It says that, that's interesting https://media.discordapp.net/attachments/371759389889003532/852516040033828924/unknown.png |
11:54:30 | * | Arrrrrrrr joined #nim |
12:00:43 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @haxscramper "I'm still not sure": 'cause with the GameMaker plugin, it plays sound |
12:02:11 | * | jacmet[m] joined #nim |
12:02:30 | * | jacmet[m] quit (Remote host closed the connection) |
12:04:15 | FromGitter | <bung87> hey , how to version dll source files, I dont want to compile every time the proc calls |
12:06:48 | * | bay1327 joined #nim |
12:07:09 | * | bay1327 quit (Remote host closed the connection) |
12:09:42 | FromDiscord | <System64 ~ Flandre Scarlet> Well I have a debug dll https://media.discordapp.net/attachments/371759389889003532/852519894053421096/gme.dll |
12:12:55 | FromGitter | <bung87> found some one compute all files hash in that dir |
12:18:20 | * | lnxw37d4 quit (Quit: Bridge terminating on SIGTERM) |
12:18:21 | * | stisa quit (Quit: Bridge terminating on SIGTERM) |
12:18:21 | * | DannyHpy[m] quit (Quit: Bridge terminating on SIGTERM) |
12:18:21 | * | reversem3 quit (Quit: Bridge terminating on SIGTERM) |
12:18:21 | * | goblinslayer[m] quit (Quit: Bridge terminating on SIGTERM) |
12:18:22 | * | cadmium[m] quit (Quit: Bridge terminating on SIGTERM) |
12:18:23 | * | Avatarfighter[m] quit (Quit: Bridge terminating on SIGTERM) |
12:18:23 | * | Clonkk[m] quit (Quit: Bridge terminating on SIGTERM) |
12:18:25 | * | fbpyr[m] quit (Quit: Bridge terminating on SIGTERM) |
12:18:25 | * | planetis[m] quit (Quit: Bridge terminating on SIGTERM) |
12:18:26 | * | nxnl[m] quit (Quit: Bridge terminating on SIGTERM) |
12:18:27 | * | ee7[m] quit (Quit: Bridge terminating on SIGTERM) |
12:18:27 | * | Hasnep[m] quit (Quit: Bridge terminating on SIGTERM) |
12:18:27 | * | MTRNord quit (Quit: Bridge terminating on SIGTERM) |
12:18:27 | * | dithpri[m] quit (Quit: Bridge terminating on SIGTERM) |
12:18:27 | * | k0mpjut0r quit (Quit: Bridge terminating on SIGTERM) |
12:18:27 | * | bfgcoding[m] quit (Quit: Bridge terminating on SIGTERM) |
12:18:27 | * | customer[m] quit (Quit: Bridge terminating on SIGTERM) |
12:18:28 | * | BusterBlue[m] quit (Quit: Bridge terminating on SIGTERM) |
12:18:28 | * | Sappy[m] quit (Quit: Bridge terminating on SIGTERM) |
12:18:28 | * | ExtraDosages[m] quit (Quit: Bridge terminating on SIGTERM) |
12:18:33 | * | gemath[m] quit (Quit: Bridge terminating on SIGTERM) |
12:18:33 | * | Zoom[m] quit (Quit: Bridge terminating on SIGTERM) |
12:18:33 | * | konradmb[m] quit (Quit: Bridge terminating on SIGTERM) |
12:18:33 | * | CodeBitCookie[m] quit (Quit: Bridge terminating on SIGTERM) |
12:18:34 | * | Guest007[m] quit (Quit: Bridge terminating on SIGTERM) |
12:18:34 | * | vegai quit (Quit: Bridge terminating on SIGTERM) |
12:18:35 | * | altarrel quit (Quit: Bridge terminating on SIGTERM) |
12:18:35 | * | bluemax[m] quit (Quit: Bridge terminating on SIGTERM) |
12:18:35 | * | wanr[m] quit (Quit: Bridge terminating on SIGTERM) |
12:18:35 | * | Gambit[m] quit (Quit: Bridge terminating on SIGTERM) |
12:18:35 | * | Edoardo[m] quit (Quit: Bridge terminating on SIGTERM) |
12:18:35 | * | asrp[m] quit (Quit: Bridge terminating on SIGTERM) |
12:18:35 | * | leorize[m] quit (Quit: Bridge terminating on SIGTERM) |
12:18:35 | * | Benjamin[m]2 quit (Quit: Bridge terminating on SIGTERM) |
12:18:35 | * | Avahe[m] quit (Quit: Bridge terminating on SIGTERM) |
12:18:36 | * | npham[m] quit (Quit: Bridge terminating on SIGTERM) |
12:18:36 | * | zuckerberg[m] quit (Quit: Bridge terminating on SIGTERM) |
12:18:36 | * | SteveMarathon[m] quit (Quit: Bridge terminating on SIGTERM) |
12:29:12 | FromDiscord | <System64 ~ Flandre Scarlet> humm weird, seems it doesn't play any sound even in C, I dunno if I need something else to play sound |
12:35:39 | FromGitter | <kaushalmodi> System64: ⏎ ⏎ > humm weird, seems it doesn't play any sound even in C ⏎ ⏎ So you'd need to first get that working. Engage that lib's developer to help find out if you are missing any dependencies [https://gitter.im/nim-lang/Nim?at=60c2071a20e86942d254319e] |
12:36:33 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3psd |
12:36:44 | * | arecaceae joined #nim |
12:36:49 | FromDiscord | <haxscramper> initialize some internal state or start playing things? |
12:38:58 | FromDiscord | <System64 ~ Flandre Scarlet> I dunno, what I know is the program creates a wav |
12:44:27 | FromDiscord | <System64 ~ Flandre Scarlet> I think I need something to play the buffer |
12:46:52 | * | kruffin joined #nim |
12:47:05 | * | kruffin quit (Remote host closed the connection) |
12:49:40 | * | johnhamelink5 joined #nim |
12:49:48 | * | johnhamelink5 quit (Remote host closed the connection) |
12:51:16 | Arrrrrrrr | Metal |
12:51:49 | * | Arrrrrrrr quit (Quit: Arrrrrrrr) |
12:51:56 | * | lritter joined #nim |
12:52:21 | FromDiscord | <System64 ~ Flandre Scarlet> ?? |
12:55:25 | * | rockcavera joined #nim |
12:57:35 | Prestige | PMunch: congrats on the 200 stars :) |
13:02:47 | FromDiscord | <System64 ~ Flandre Scarlet> it's me or an audio buffer is just an array of number that describe the waveform? |
13:02:55 | FromDiscord | <System64 ~ Flandre Scarlet> (edit) "number" => "numbers" |
13:03:18 | FromGitter | <kaushalmodi> Everything on a computer is just 1's and 0's |
13:04:02 | FromDiscord | <System64 ~ Flandre Scarlet> I made a loop that prints the values of a buffer and... https://media.discordapp.net/attachments/371759389889003532/852533563878539304/unknown.png |
13:12:55 | * | Guest007[m] joined #nim |
13:14:12 | * | Guest007[m] quit (Remote host closed the connection) |
13:15:09 | FromDiscord | <System64 ~ Flandre Scarlet> But I think GME_PLAY just outputs a buffer |
13:20:36 | * | Guest007[m] joined #nim |
13:21:49 | * | Guest007[m] quit (Remote host closed the connection) |
13:26:52 | * | fputs joined #nim |
13:29:26 | * | Hund17 joined #nim |
13:29:58 | * | Hund17 quit (Remote host closed the connection) |
13:30:33 | FromDiscord | <System64 ~ Flandre Scarlet> Is there a module that can play a buffer ?) |
13:32:40 | FromDiscord | <haxscramper> IIRC sdl can work with audio buffers |
13:36:43 | FromDiscord | <System64 ~ Flandre Scarlet> Okay I have sdl2 |
13:37:27 | FromDiscord | <System64 ~ Flandre Scarlet> So I need to interop with |
13:43:29 | * | Guest007[m] joined #nim |
13:45:57 | FromDiscord | <haxscramper> There is a SDL wrapper already |
13:52:58 | FromDiscord | <System64 ~ Flandre Scarlet> Oh nice |
13:53:09 | FromDiscord | <System64 ~ Flandre Scarlet> Do you mean SDL or SDL_MIXER ? |
14:00:19 | * | PMunch quit (Quit: Leaving) |
14:02:55 | * | tiorock joined #nim |
14:02:55 | * | rockcavera is now known as Guest91232 |
14:02:55 | * | tiorock quit (Changing host) |
14:02:55 | * | tiorock joined #nim |
14:02:56 | * | Guest91232 quit (Killed (hostsailor.freenode.net (Nickname regained by services))) |
14:02:56 | * | tiorock is now known as rockcavera |
14:07:07 | * | Zoom[m] joined #nim |
14:07:07 | * | Avahe[m] joined #nim |
14:07:07 | * | Avatarfighter[m] joined #nim |
14:07:07 | * | cadmium[m] joined #nim |
14:07:07 | * | customer[m] joined #nim |
14:07:07 | * | DannyHpy[m] joined #nim |
14:07:08 | * | goblinslayer[m] joined #nim |
14:07:08 | * | leorize[m] joined #nim |
14:07:08 | * | lnxw37d4 joined #nim |
14:07:08 | * | k0mpjut0r joined #nim |
14:07:08 | * | MTRNord joined #nim |
14:07:08 | * | npham[m] joined #nim |
14:07:09 | * | planetis[m] joined #nim |
14:07:09 | * | reversem3 joined #nim |
14:07:09 | * | Clonkk[m] joined #nim |
14:07:09 | * | stisa joined #nim |
14:07:09 | * | Benjamin[m]12 joined #nim |
14:07:13 | * | ee7[m] joined #nim |
14:07:14 | * | konradmb[m] joined #nim |
14:07:14 | * | altarrel joined #nim |
14:07:14 | * | fbpyr[m] joined #nim |
14:07:14 | * | Edoardo[m]1 joined #nim |
14:07:14 | * | ExtraDosages[m] joined #nim |
14:07:14 | * | dithpri[m] joined #nim |
14:07:14 | * | CodeBitCookie[m] joined #nim |
14:07:14 | * | bluemax[m] joined #nim |
14:07:14 | * | asrp[m] joined #nim |
14:07:14 | * | BusterBlue[m] joined #nim |
14:07:14 | * | bfgcoding[m] joined #nim |
14:07:15 | * | vegai joined #nim |
14:07:15 | * | nxnl[m] joined #nim |
14:07:15 | * | SteveMarathon[m] joined #nim |
14:07:15 | * | gemath[m] joined #nim |
14:07:15 | * | Sappy[m] joined #nim |
14:07:15 | * | Hasnep[m] joined #nim |
14:07:16 | * | wanr[m] joined #nim |
14:07:16 | * | zuckerberg[m] joined #nim |
14:07:16 | * | Gambit[m] joined #nim |
14:08:52 | FromDiscord | <System64 ~ Flandre Scarlet> I think SDL_MIXER can do sound too |
14:15:29 | FromDiscord | <Goel> https://github.com/nim-lang/sdl2 |
14:20:59 | FromGitter | <kaushalmodi> timotheecour: Are you here? I am trying to update a testament test. I am seeing that the Hint messages in the discard""" .. """ get shuffled. Is that expected? |
14:31:52 | FromGitter | <kaushalmodi> Anyways, I created a PR ref: https://github.com/nim-lang/Nim/pull/18232/files . I see that I need to put the warnings in the exact order. I expected the line number changes but not the order of warnings. |
14:39:32 | FromDiscord | <System64 ~ Flandre Scarlet> WTF seems hard to play a buffer! |
14:43:47 | ForumUpdaterBot | New thread by Kaushalmodi: Test for https://github.com/nim-lang/Nim/issues/9070, see https://forum.nim-lang.org/t/8104 |
14:53:30 | FromDiscord | <Ricky Spanish> anyone konw of any nim packages for formatting text/code files? or something to assist me in setting my own formatting rules easily |
14:54:06 | FromDiscord | <System64 ~ Flandre Scarlet> I think I found the C++ code for playing music https://media.discordapp.net/attachments/371759389889003532/852561265595252736/message.cpp |
14:54:58 | FromGitter | <bung87> formatting nim code ? nimpretty |
14:55:31 | FromDiscord | <Ricky Spanish> not nim code is the issue, really i want something i can use to define my own rules for formatting text easilly |
14:56:35 | FromGitter | <bung87> strutils or strformat has a proc that you can define custom open char and close char |
14:57:25 | FromDiscord | <Ricky Spanish> hm ok thanks ill take a look and see |
14:59:05 | FromGitter | <bung87> https://nim-lang.org/docs/strformat.html#fmt.m%2Cstring%2Cchar%2Cchar |
15:04:17 | * | NimBot joined #nim |
15:09:12 | * | slobber3 joined #nim |
15:09:44 | * | slobber3 quit (Remote host closed the connection) |
15:14:08 | * | fkrone24 joined #nim |
15:14:35 | * | fkrone24 quit (Remote host closed the connection) |
15:25:57 | FromDiscord | <haxscramper> In reply to @Ricky Spanish "not nim code is": if you want to try I have reimplementation of `google/rfmt` code layout algorithm https://haxscramper.github.io/hmisc/src/hmisc/other/blockfmt.html |
15:26:44 | FromDiscord | <Ricky Spanish> yes thats exactly the kind of thing im looking for |
15:26:55 | FromDiscord | <haxscramper> And several sequence alignment algorithms https://haxscramper.github.io/hmisc/src/hmisc/algo/hseq_distance.html#needlemanWunschAlign%2Cseq%5BT%5D%2Cseq%5BT%5D%2Cint%2Cproc%28T%2CT%29 |
15:27:26 | FromDiscord | <haxscramper> But it is proof-of-concept at best, so not a lot of examples beyond tests. |
15:28:40 | FromDiscord | <Ricky Spanish> worth a try, for now iv got a fairly limited usecase for it anyway so worth experimenting, thanks |
15:38:28 | * | bonz0601 joined #nim |
15:38:35 | * | bonz0601 quit (Remote host closed the connection) |
16:21:03 | * | M4z7ido[m|gr] joined #nim |
16:21:13 | * | M4z7ido[m|gr] quit (Remote host closed the connection) |
16:32:01 | * | Vladar quit (Quit: Leaving) |
16:36:00 | * | Vladar joined #nim |
16:40:14 | * | theluckymike joined #nim |
16:40:34 | * | theluckymike quit (Remote host closed the connection) |
16:47:28 | * | narimiran quit (Ping timeout: 258 seconds) |
17:16:42 | * | setuid5 joined #nim |
17:16:43 | * | setuid5 quit (Remote host closed the connection) |
17:32:07 | * | willyboar joined #nim |
17:48:44 | FromDiscord | <Goel> sent a code paste, see https://play.nim-lang.org/#ix=3pug |
17:49:19 | FromDiscord | <haxscramper> I think you can unpack `(v, n, a, b) = (0,0,0,0)` |
17:49:38 | FromDiscord | <haxscramper> But there is no python(?)-like assign for multiple values |
17:50:15 | FromDiscord | <haxscramper> !eval var a, b, c: int; (a, b, c) = (1, 2, 3); echo a,b,c |
17:50:17 | NimBot | 123 |
17:50:19 | * | rockcavera quit (Remote host closed the connection) |
17:50:52 | FromDiscord | <Bung> !eval var a,b,c = 0 |
17:50:55 | NimBot | <no output> |
17:51:19 | FromDiscord | <Bung> !eval var a,b,c = 1; echo a,b,c |
17:51:20 | FromDiscord | <haxscramper> !eval var a, b, c = 112; echo a, " ", b, " ", c |
17:51:22 | NimBot | 111 |
17:51:22 | NimBot | 112 112 112 |
17:52:09 | FromDiscord | <Bung> !eval var a,b,c:int; a,b,c=1; echo a,b,c |
17:52:11 | NimBot | Compile failed: /usercode/in.nim(1, 17) Error: invalid indentation |
17:53:44 | FromDiscord | <Goel> sent a code paste, see https://play.nim-lang.org/#ix=3puh |
17:54:03 | FromDiscord | <Goel> (edit) "https://play.nim-lang.org/#ix=3puh" => "https://play.nim-lang.org/#ix=3pui" |
17:54:27 | FromDiscord | <Goel> (edit) "https://play.nim-lang.org/#ix=3pui" => "https://play.nim-lang.org/#ix=3puj" |
17:54:45 | FromDiscord | <Bung> this wont work |
17:54:46 | FromDiscord | <Bung> sent a code paste, see https://play.nim-lang.org/#ix=3pul |
17:57:14 | FromDiscord | <haxscramper> In reply to @Goel "Ok yes packing/unpacking was": They can't be assigned because the syntax does not support this |
17:57:27 | FromDiscord | <haxscramper> This is simply not implemented this way |
18:01:27 | * | mst joined #nim |
18:01:58 | mst | huh |
18:02:03 | mst | not upgraded to libera yet |
18:05:55 | * | xet7 quit (Remote host closed the connection) |
18:07:24 | * | xet7 joined #nim |
18:20:58 | * | tane joined #nim |
18:28:45 | * | willyboar quit (Remote host closed the connection) |
18:29:21 | * | willyboar joined #nim |
18:32:55 | ldlework | mst: please don't bring that in here |
18:46:30 | mst | ldlework: "bring htat in here" what |
18:47:32 | * | kaste5 joined #nim |
18:47:37 | * | kaste5 quit (Remote host closed the connection) |
18:54:38 | ldlework | "huh, not upgraded to libera yet" is pretty transparently loaded, and the channel has gotten on just fine until now |
18:54:52 | * | Vladar quit (Quit: Leaving) |
19:01:21 | * | crem1 quit (Quit: WeeChat 3.0) |
19:01:33 | * | crem joined #nim |
19:02:03 | * | crem quit (Client Quit) |
19:04:41 | * | crem joined #nim |
19:05:55 | FromDiscord | <System64 ~ Flandre Scarlet> do you know how can I play a buffer with SDL2 please? |
19:08:20 | * | fputs quit (Remote host closed the connection) |
19:10:22 | * | fputs joined #nim |
19:27:00 | * | larbob6 joined #nim |
19:27:39 | * | larbob6 quit (Remote host closed the connection) |
19:32:01 | * | ZoomZoomZoom joined #nim |
19:33:53 | * | SebastianM joined #nim |
19:38:11 | mst | ldlework: it's -opinionated- but not reloaded |
19:40:12 | mst | ldlework: I presume you've warned all your users that their passwords are potentially compromised now? |
19:40:19 | Prestige | Flandre - I think there are examples online, but I haven't used SDL2 myself |
19:40:37 | ldlework | mst: do you have a question about nim? |
19:40:38 | mst | ldlework: I'm working with the new sysadmin team to make sure that can't happen again but it's a legitimate concern |
19:41:05 | mst | I might an idle comment and you addressed -me- |
19:41:16 | mst | I wasn't going to mention it further |
19:41:47 | mst | honestly, I'm mostly here because I'm impressed that ORC is a production version of the Bacon recylcer algorithm |
19:41:51 | ldlework | > question about nim |
19:41:53 | ldlework | I guess not. |
19:42:25 | ldlework | cool, carry on then |
19:42:38 | mst | and I haven't asked anything specifically yet because I'm still RTFMing about a bunch of stuff |
19:44:35 | * | rockcavera joined #nim |
19:45:02 | mst | one thing I am curious about - is there a flag for ORC for this already or could such a thing be added so that it would emit warnings any time it cleaned up a cycle? |
19:46:27 | * | SebastianM quit (Quit: -a- Bye Bye) |
19:46:56 | FromDiscord | <haxscramper> I'm not aware of such flag for orc (runtime flag), and compile-time cycle detection is not available (and I'm not sure if this is even possible in theory) |
19:47:34 | mst | no, no, I know compile time cycle detection isn't going to be a thing |
19:48:04 | * | narimiran joined #nim |
19:48:22 | mst | what I'm thinking about is running orc during dev/test/stage/soak |
19:48:37 | mst | but with a view to ensuring that cycles can be eliminated |
19:48:41 | mst | so production can be arc |
19:49:28 | mst | I have perl code that runs in dev/test/stage/soak with a periodic check for cycles that breaks them and emits a warning |
19:50:06 | mst | this is also where possible a good idea for python since python's mark/sweep GC sucks basketballs through a carbon nanotube straw |
19:50:50 | mst | if this means I'd have to add the 'warnOnCycles' or whatever flag for orc that doesn't bother me |
19:51:08 | mst | I just wanted to make sure I hadn't missed an already existing one |
19:56:35 | mst | ldlework: note while it's not my -primary- goal in getting interested in nim, making it such that I can write perl/XS modules using it is an interesting first step |
19:56:58 | ldlework | yo nim is awesome and i hope you enjoy it |
19:57:26 | mst | having read most of the manual and a bunch of other bits |
19:57:31 | mst | it's looking like serious fun to me |
19:57:58 | mst | though I'm going to have to figure out a way to do weak references that fits my paradigm |
19:59:38 | * | willyboar quit () |
20:01:04 | mst | ldlework: my apologies for starting off with a comment that would've been identical to the comment made by a single purpose troll |
20:02:53 | * | letto quit (Quit: Konversation terminated!) |
20:04:24 | * | ZoomZoomZoom quit (Ping timeout: 240 seconds) |
20:05:28 | * | letto joined #nim |
20:06:23 | * | ZoomZoomZoom joined #nim |
20:07:28 | FromDiscord | <haxscramper> https://nim-lang.org/docs/system.html#GC_getStatistics might be somewhere close |
20:08:19 | FromDiscord | <haxscramper> `std/system` has a number of GC-related procedures, but honestly I think there is no built-in way to get this sort of information unless it was exposed for debugging purposes by some obscure switch |
20:08:50 | FromDiscord | <haxscramper> That is not mentioned anywhere due to "for internal debugging only" |
20:09:25 | mst | haxscraper, that info isn't -exactly- what I want but it -is- absolutely a great place for me to start looking towards achieving my goals with a patch |
20:09:29 | FromDiscord | <Hi02Hi> In reply to @haxscramper "https://nim-lang.org/docs/system.html#GC_getStatist": i actually think that works https://play.nim-lang.org/#ix=3pvd |
20:09:57 | FromDiscord | <haxscramper> `[GC] cycle collections: 0` |
20:10:02 | * | strepto joined #nim |
20:10:08 | * | strepto quit (Remote host closed the connection) |
20:10:43 | mst | right, my plan is to emit some sort of (configurable) warning any time there -is- a cycle collection |
20:11:10 | FromDiscord | <Lefl> sent a code paste, see https://play.nim-lang.org/#ix=3pvg |
20:12:03 | FromDiscord | <Lefl> Hmm there's `atEnd()` |
20:12:14 | FromDiscord | <ElegantBeef> Probably should peek exit code |
20:12:29 | FromDiscord | <ElegantBeef> Also if you're interacting with python there is a library that does just that |
20:12:32 | FromDiscord | <haxscramper> file stream can become nil if process died |
20:13:09 | mst | as an example, I have perl code that on END {} scans all live objects on the heap, detects cycles, and complains about them |
20:13:18 | FromDiscord | <Lefl> Hmm thanks |
20:13:56 | mst | I *love* the recycler algorithm (which is what ORC's cycle collection is based on) |
20:15:16 | mst | but I also consider it worthwile to take a program that initially requires ORC to avoid leaking, and turn it into one that's leak free under ARC |
20:16:03 | mst | note I'm not going to feel entitled to anybody else writing code to make that work |
20:16:22 | * | narimiran quit (Ping timeout: 258 seconds) |
20:16:32 | mst | one of the reasons nim is interesting to me is because the ORC+ARC facility means it's already close enough that I can hopefully bridge the gap myself |
20:18:11 | FromDiscord | <Lefl> Hmm I think the problem is that `readline` is blocking and waits for something to happen, but the stream turns to nil in the meantime |
20:18:51 | FromDiscord | <Lefl> So checking the exit code is meaningless |
20:19:22 | FromDiscord | <Bung> sent a code paste, see https://play.nim-lang.org/#ix=3pvh |
20:19:41 | mst | the readline code in the stdlib kinda made me want to cry when I read it |
20:19:42 | mst | except |
20:19:43 | FromDiscord | <Bung> without echo repr config , when call PureHeader config become nil ? |
20:19:56 | mst | I could understand the entire bloody thing |
20:20:07 | mst | so if I'm right that it -deserves- making me cry, I'll send patches |
20:21:06 | FromDiscord | <ElegantBeef> In reply to @Lefl "Hmm I think the": Is there a reason you just dont wait for the exit code to change then read the entire stdout? |
20:21:44 | * | PMunch joined #nim |
20:23:22 | FromDiscord | <Lefl> Yes, I'm using the python program to connect to an HM-10 bluetooth module which broadcasts sensor data. And the python program outputs the data as json which I want to use in nim |
20:23:49 | FromDiscord | <Lefl> Technically I could also write the values into a database from the python program |
20:23:50 | FromDiscord | <ElegantBeef> So then why not use nimpy? https://github.com/yglukhov/nimpy |
20:24:58 | FromDiscord | <Lefl> Because I'm trying to circumvent an issue with reconnecting to the device. If connection is lost the new connection won't hold up for long unless I restart the python process for whatever reason |
20:25:21 | FromDiscord | <Lefl> Also does that nimpy work with asynchronous python funcitons |
20:25:25 | FromDiscord | <Lefl> (edit) "funcitons" => "funcitons?" |
20:25:47 | FromDiscord | <Lefl> (edit) "funcitons?" => "functions?" |
20:26:01 | FromDiscord | <ElegantBeef> No clue i only write Nim 😄 |
20:26:10 | FromDiscord | <Lefl> I haven't tried it yet because I first wanted to try the "easy" way |
20:26:31 | FromDiscord | <Lefl> In reply to @ElegantBeef "No clue i only": Then write a bluetooth LE library for me 😄 |
20:26:40 | mst | give me a couple months and I'll have full integration with perl async/await |
20:26:49 | mst | and it'll still be completely useless to you, I'm sure |
20:26:57 | mst | but it's going to amuse me to make it work anyway |
20:27:30 | FromDiscord | <ElegantBeef> Does nimbluez not work for you? |
20:28:10 | FromDiscord | <Lefl> I don't think it supports bluetooth le? |
20:28:13 | FromDiscord | <Lefl> I'm not sure |
20:28:55 | FromDiscord | <ElegantBeef> What OS? |
20:29:30 | FromDiscord | <Lefl> Linux |
20:29:38 | FromDiscord | <ElegantBeef> BlueZ Supports LE it seems |
20:29:59 | FromDiscord | <ElegantBeef> I think the steam controller uses LE so i can check if you want 😄 |
20:31:36 | FromDiscord | <Bung> how to copy base ref object properties to inherited ref object ? |
20:32:12 | FromDiscord | <Lefl> In reply to @ElegantBeef "BlueZ Supports LE it": Yeah it does, but the question is if I can use that in NimblueZ |
20:32:12 | FromDiscord | <Bung> seesm casting and assign have problem |
20:32:22 | FromDiscord | <haxscramper> not possible without manual copying |
20:32:22 | FromDiscord | <Lefl> Hmm I'll try some stuff |
20:32:49 | FromDiscord | <haxscramper> Last time I asked the same question, the answer was: copy each field one-by-one |
20:34:19 | FromDiscord | <haxscramper> This might be optimized with `fieldPairs` though |
20:34:24 | FromDiscord | <Bung> how you do that , object does not have key |
20:34:46 | FromDiscord | <Bung> obj.what = a |
20:37:17 | FromDiscord | <haxscramper> In reply to @haxscramper "This might be optimized": no, it seems like this is not possible with only `fieldPairs` |
20:37:41 | FromDiscord | <haxscramper> In reply to @Bung "obj.what = a": `var derived = Derived(); base = Base(); deried.field = base.field` |
20:37:53 | FromDiscord | <Lefl> Hmm that nimbluez example for device discovery doesn't even work for me |
20:38:14 | * | tane quit (Quit: Leaving) |
20:39:12 | FromDiscord | <Lefl> It doesn't print out anything |
20:40:06 | FromDiscord | <Bung> that sounds bad, I have many properties |
20:40:08 | mst | ok. will be back when I've Rtfmed enough to have better questions |
20:40:10 | mst | cheers all |
20:40:12 | * | mst left #nim (#nim) |
20:40:36 | FromDiscord | <ElegantBeef> Seems it's macro time for reassignment of inherited properties |
20:40:41 | FromDiscord | <Rainbow Asteroids> who needs to rtfm when other people can do it for you |
20:40:46 | * | blackpawn quit (Ping timeout: 260 seconds) |
20:41:01 | FromDiscord | <ElegantBeef> Rainbow spoken like a true new programmer 😄 |
20:41:26 | FromDiscord | <Bung> in js just Object.assign |
20:41:58 | FromDiscord | <ElegantBeef> Excuse me it's macro time |
20:45:20 | FromDiscord | <haxscramper> I think I did it somehow with `fieldPairs`, but I literally can't remember how |
20:45:59 | FromDiscord | <haxscramper> but it was a horrible hack |
20:46:07 | FromDiscord | <ElegantBeef> Yea i dont know how you'd do it with field pairs either |
20:51:06 | * | blackpawn joined #nim |
20:51:18 | FromDiscord | <Lefl> Ok this is cool, the library I initially used works waaay better for reconnecting. It'd still be a problem when trying to stop the program gracefully |
20:54:10 | FromDiscord | <ElegantBeef> @Bung this might do the trick 😄 https://play.nim-lang.org/#ix=3pvr |
20:56:23 | FromDiscord | <Bung> sent a code paste, see https://play.nim-lang.org/#ix=3pvs |
20:56:40 | FromDiscord | <Bung> but it turns to literal k perperty |
20:57:40 | FromDiscord | <ElegantBeef> well yea it's a string |
20:58:45 | FromDiscord | <Lefl> Hey I could probably use nimpy with that library |
20:58:49 | FromDiscord | <Lefl> No more readline |
21:00:16 | FromDiscord | <Bung> Error: in expression 'result.title': identifier expected, but found 'title' |
21:00:30 | FromDiscord | <Bung> `Error: in expression 'result.title': identifier expected, but found 'title'` |
21:00:46 | FromDiscord | <Bung> i tried yours |
21:01:11 | FromDiscord | <ElegantBeef> ah exported fields |
21:01:39 | FromDiscord | <ElegantBeef> https://play.nim-lang.org/#ix=3pvy |
21:01:45 | FromDiscord | <ElegantBeef> Hopefully that works 😄 |
21:01:58 | FromDiscord | <Lefl> Damn this will be awesome |
21:02:28 | FromDiscord | <ElegantBeef> Well you're using python still, so not that awesome 😛 |
21:02:44 | FromDiscord | <Lefl> Well if I could use nim only that would be legendary 😄 |
21:03:00 | FromDiscord | <ElegantBeef> Well time for you to get bluez working |
21:06:05 | FromDiscord | <Bung> yeah it works |
21:06:14 | FromDiscord | <ElegantBeef> And bung that will not work on object variants right now, so be catious |
21:06:32 | FromDiscord | <Bung> ref object result does not initial automaticlly ? |
21:06:47 | FromDiscord | <ElegantBeef> They default to nil |
21:07:06 | FromDiscord | <ElegantBeef> But `RefObj()` does 0 init |
21:08:13 | FromDiscord | <Bung> it intial automatically when decalre as var ? |
21:09:56 | FromDiscord | <Bung> yeah use var it even cant compare to nil |
21:10:55 | * | dpawlik10 joined #nim |
21:11:08 | FromDiscord | <Bung> Thanks ! the only way it works , I tried copyMem and casting none of them work |
21:11:32 | * | dpawlik10 quit (Remote host closed the connection) |
21:13:33 | FromDiscord | <ElegantBeef> Well if you dont want to manually initialize the type you can use this https://play.nim-lang.org/#ix=3pvC |
21:13:47 | FromDiscord | <ElegantBeef> Expand it where you need it to be |
21:15:21 | FromDiscord | <Bung> works like charm! |
21:15:48 | FromDiscord | <ElegantBeef> Could even add a check to see if the parent is nil |
21:15:52 | FromDiscord | <ElegantBeef> Then it'd be magic 😄 |
21:16:53 | FromDiscord | <Bung> if it will cover all case maybe add as api to macros module |
21:17:46 | FromDiscord | <Bung> since this use case is very common |
21:21:49 | FromGitter | <kaushalmodi> That's a wonderful macro. May be call it `copy`? |
21:24:28 | FromDiscord | <ElegantBeef> If only i was as good at naming things as i was making macros 😄 |
21:26:06 | * | PMunch quit (Quit: leaving) |
21:27:43 | FromGitter | <kaushalmodi> But seriously, I think this macro will be a great fit in macros or sugar stdlib. It's worth creating a PR. |
21:47:30 | ForumUpdaterBot | New Nimble package! statistical_tests - Statistical tests in Nim., see https://github.com/ayman-albaz/statistical-tests |
21:55:56 | * | Teeed_ joined #nim |
21:56:12 | * | Teeed_ quit (Remote host closed the connection) |
22:20:28 | * | salimfadhley joined #nim |
22:20:47 | * | salimfadhley quit (Remote host closed the connection) |
22:24:53 | * | fputs quit (Remote host closed the connection) |
22:27:03 | * | rockcavera quit (Read error: Connection reset by peer) |
22:27:29 | * | rockcavera joined #nim |
22:36:49 | * | lritter quit (Quit: Leaving) |
22:38:12 | FromDiscord | <dom96> https://conf.nim-lang.org/?ref=dsc 👀 |
22:44:44 | FromGitter | <kaushalmodi> Awesome! Going through it now. Btw the page header is off centered on the phone. |
22:47:13 | FromDiscord | <dom96> https://github.com/nim-lang/conf.nim-lang.org in case you're up for helping fix the mobile issue, PRs welcome 🙂 |
23:14:00 | * | holm joined #nim |
23:14:06 | * | holm quit (Remote host closed the connection) |
23:34:45 | * | ZoomZoomZoom quit (Ping timeout: 272 seconds) |
23:51:46 | * | trobotham joined #nim |
23:51:46 | * | trobotham is now known as Guest9775 |
23:52:14 | * | Guest9775 quit (Remote host closed the connection) |