00:05:22 | FromDiscord | <! Nilts> In reply to @Patitotective "`var node = something.querySelector()`": ok???? But will that change the parents? |
00:06:08 | FromDiscord | <Patitotective> i really have no idea, ive never used xml before↵i suggest you to read the docs, source code and test things by yourself |
00:07:55 | FromDiscord | <Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=4a50 |
00:08:06 | FromDiscord | <Patitotective> perhaps it is some weird thing with templates (?) |
00:08:38 | FromDiscord | <Elegantbeef> > return |
00:08:43 | FromDiscord | <Elegantbeef> You have return in your template |
00:09:43 | FromDiscord | <Patitotective> it doesnt return in the procedure it is called on ? |
00:09:50 | FromDiscord | <Patitotective> or it just breaks the template |
00:09:52 | FromDiscord | <Elegantbeef> That's the point |
00:10:01 | FromDiscord | <Elegantbeef> `if not x.ok: return` |
00:10:18 | FromDiscord | <Elegantbeef> How are you going to set `ok` if you're returning? |
00:10:39 | FromDiscord | <Elegantbeef> Dumb sentence |
00:10:50 | FromDiscord | <Elegantbeef> How are you going to run `assert =result == (false, "")` if you're returning |
00:11:47 | FromDiscord | <Patitotective> i understand that but i dont understand why creating a `temp` variable suddenly doesnt trigger `if not x.ok: return` |
00:12:09 | * | jmdaemon joined #nim |
00:12:39 | FromDiscord | <Elegantbeef> Well your template is done wrong in the first place |
00:13:07 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/ZmL |
00:13:17 | FromDiscord | <Elegantbeef> remember that templates are lazily evaluated so `x` is pasted everywhere inside the template |
00:13:48 | FromDiscord | <Elegantbeef> So in the first case you were getting a bunch of tokens, in the second case you were getting one |
00:14:21 | FromDiscord | <Patitotective> oooooh |
00:14:23 | FromDiscord | <Patitotective> yes |
00:14:27 | FromDiscord | <Patitotective> thanks 🧠 |
00:19:04 | FromDiscord | <Patitotective> In reply to @Elegantbeef "remember that templates are": i should tattoo this |
00:20:55 | FromDiscord | <! Nilts> Ive read the docs and can't figure out how to change add to the body tag oh html xml |
00:23:39 | FromDiscord | <Patitotective> In reply to @not logged in "Ive read the docs": code? |
00:24:32 | FromDiscord | <! Nilts> In reply to @Patitotective "code?": ? wyd↵i have a thing i wan't to add named `stylecont` and i wan't to add it to the page `xml` |
00:25:22 | FromDiscord | <Patitotective> can you give a minimal code example of the thing you can't do |
00:26:20 | FromDiscord | <! Nilts> In reply to @Patitotective "can you give a": how, if i can't do it? like sudocode? |
00:27:01 | FromDiscord | <Rainbow Asteroids> In reply to @not logged in "? wyd i have": what library are you working with |
00:27:26 | FromDiscord | <! Nilts> In reply to @Rainbow Asteroids "what library are you": std/xmltree? or nimquery |
00:29:15 | FromDiscord | <! Nilts> sent a code paste, see https://play.nim-lang.org/#ix=4a54 |
00:29:26 | FromDiscord | <Patitotective> what type is `xml`? |
00:32:48 | FromDiscord | <! Nilts> In reply to @Patitotective "what type is `xml`?": `.kind` got `xnElement` |
00:33:40 | FromDiscord | <Patitotective> https://nim-lang.org/docs/xmltree.html#add%2CXmlNode%2CXmlNode ? |
00:34:48 | FromDiscord | <! Nilts> In reply to @Patitotective "https://nim-lang.org/docs/xmltree.html#add%2CXmlNod": thats not the problem, the problem is getting the body attached to the xml so that if i add to body it will add to body of xml |
00:35:15 | * | droidrage quit (Ping timeout: 248 seconds) |
00:35:21 | FromDiscord | <Patitotective> https://nim-lang.org/docs/xmltree.html#child%2CXmlNode%2Cstring ? |
00:35:49 | FromDiscord | <! Nilts> YES, thanks |
00:36:31 | FromDiscord | <Patitotective> you really need to read the docs |
00:36:40 | FromDiscord | <Rainbow Asteroids> sent a code paste, see https://play.nim-lang.org/#ix=4a56 |
00:37:09 | FromDiscord | <! Nilts> sent a code paste, see https://play.nim-lang.org/#ix=4a57 |
00:37:16 | FromDiscord | <! Nilts> In reply to @Patitotective "you really need to": `SIGSEGV: Illegal storage access. (Attempt to read from nil?)` |
00:39:48 | FromDiscord | <! Nilts> it can't seem to find body |
00:41:41 | FromDiscord | <Patitotective> ok |
00:42:34 | FromDiscord | <auxym> playground appears to be dead again. |
00:43:48 | FromDiscord | <auxym> sent a code paste, see https://play.nim-lang.org/#ix=4a58 |
00:44:52 | FromDiscord | <Elegantbeef> `N: static int` |
00:45:11 | FromDiscord | <! Nilts> In reply to @not logged in "it can't seem to": It can never find body :( |
00:45:34 | FromDiscord | <auxym> In reply to @Elegantbeef "`N: static int`": ahh yeah. ty. 👍 |
00:45:37 | FromDiscord | <Elegantbeef> Typeclasses cannot have a `sizeof` though |
00:45:54 | FromDiscord | <Elegantbeef> `CdcUnionDescriptor` is a typeclass that can be any size, so it shouldnt crash but should error |
00:46:44 | FromDiscord | <auxym> yeah makes sense. I agree with error instead of crash, I'll try and write up an issue if one doesn't exist yet (though it's a pretty minor bug) |
00:47:02 | FromDiscord | <Elegantbeef> Just make a bug fix |
00:47:04 | FromDiscord | <Elegantbeef> I believe |
00:48:36 | FromDiscord | <auxym> yeah the compiler code base is scary D: |
00:48:43 | FromDiscord | <Rainbow Asteroids> sent a code paste, see https://play.nim-lang.org/#ix=4a59 |
00:48:46 | FromDiscord | <auxym> I never even built it from source actually |
00:48:57 | FromDiscord | <Rainbow Asteroids> building the compiler is easy |
00:48:59 | FromDiscord | <Elegantbeef> This isnt too hard though↵(@auxym) |
00:49:37 | FromDiscord | <auxym> might take a stab. is there instructions somewhere to build the compiler in debug and get a stack trace? |
00:49:52 | FromDiscord | <Elegantbeef> `./koch temp c myCode.nim` |
00:50:00 | FromDiscord | <Elegantbeef> After building koch of course |
00:50:13 | FromDiscord | <auxym> ok |
00:50:32 | FromDiscord | <Rainbow Asteroids> https://nim-lang.github.io/Nim/koch.html |
00:50:52 | FromDiscord | <Elegantbeef> In this case it's likely just a simple `if n.typ in tyTypeclasses: ## write out error that you cannot use sizeof on a typeclass` |
00:51:04 | FromDiscord | <! Nilts> sent a code paste, see https://play.nim-lang.org/#ix=4a5a |
00:58:45 | FromDiscord | <! Nilts> ? |
01:00:36 | FromDiscord | <! Nilts> btw, is it just me or is play.nim-lang.org not working? |
01:01:10 | FromDiscord | <auxym> same here. @PMunch might need to reboot it? |
01:05:39 | FromDiscord | <! Nilts> sent a code paste, see https://play.nim-lang.org/#ix=4a5c |
01:12:37 | FromDiscord | <Patitotective> ill get tired of asking you to send some code |
01:43:02 | * | monkeybusiness quit (Quit: Leaving) |
01:45:38 | FromDiscord | <! Nilts> In reply to @Patitotective "ill get tired of": some or all? Your not telling me what code to send. I’m not the kind of person that instantly knows what people want from me |
01:46:41 | FromDiscord | <Patitotective> In reply to @not logged in "some or all? Your": enough code to reproduce the problem |
01:47:36 | FromDiscord | <! Nilts> In reply to @Patitotective "enough code to reproduce": 1 sec |
01:50:41 | * | arkurious quit (Quit: Leaving) |
01:51:29 | FromDiscord | <! Nilts> sent a code paste, see https://play.nim-lang.org/#ix=4a5g |
01:52:11 | FromDiscord | <Patitotective> i thought you were using std/xmltree |
01:53:37 | FromDiscord | <Patitotective> the issue is that `nimquery` uses `std/xmltree.XmlNode` while `querySelectorAll` wants `fusion/htmlparser/xmltree.XmlNode` |
01:53:40 | FromDiscord | <Patitotective> i guess |
01:54:51 | FromDiscord | <Patitotective> sent a code paste, see https://paste.rs/h49 |
01:58:20 | FromDiscord | <! Nilts> sent a code paste, see https://play.nim-lang.org/#ix=4a5i |
01:58:43 | FromDiscord | <Patitotective> then you cannot use nimquery |
02:00:21 | FromDiscord | <! Nilts> In reply to @Patitotective "then you cannot use": is there an alternative? |
02:01:17 | FromDiscord | <Patitotective> you could fork nimquery to support fusion |
02:05:23 | * | jmdaemon quit (Ping timeout: 248 seconds) |
02:22:38 | FromDiscord | <Elegantbeef> @Girvo\: so wasm3 is kinda cursed, but it works 😄 |
02:22:39 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1017983414927896686/image.png |
02:23:20 | FromDiscord | <Elegantbeef> Yes instead of using object variants in an array to call a procedure it uses a `ptr pointer` |
02:34:18 | FromDiscord | <Raynei486> is nim a sane alternative to shell script? |
02:34:32 | FromDiscord | <Raynei486> I want to throw something together but I'm not really good at python or shell |
02:34:51 | FromDiscord | <Elegantbeef> I use Nim a lot for oneoff things since it's more comfortable and less error prone |
02:35:03 | FromDiscord | <Esther> It definitely can be, but it depends where you want to run it |
02:35:59 | FromDiscord | <Patitotective> the hardest part of the kdl implementation is going to be to pass the test suite since it needs to fulfill the _translation rules_ https://github.com/kdl-org/kdl/tree/main/tests#translation-rules |
02:36:23 | FromDiscord | <Esther> In reply to @Esther "It definitely can be,": If you’re able to install nim to the computer without much fuss then yeah go for it :shrug: |
02:36:33 | FromDiscord | <Elegantbeef> > Any duplicate properties must be removed, with only the rightmost one remaining. This also means duplicate properties must be allowed. |
02:36:34 | FromDiscord | <Raynei486> In reply to @Esther "It definitely can be,": well it's just going to be on my own computer |
02:36:41 | FromDiscord | <Elegantbeef> Why... is this allowed, like the fuck |
02:36:49 | FromDiscord | <Raynei486> ah alright 👍 |
02:36:51 | FromDiscord | <Elegantbeef> Duplicate properties should be a error |
02:37:18 | FromDiscord | <Elegantbeef> If only the latest property is the correct one you have a very error prone system |
02:37:41 | madprops | what's the best kept secret programming language? |
02:37:57 | FromDiscord | <Patitotective> In reply to @Elegantbeef "> Any duplicate properties": i dont get those two sentences, like are they removed or are they allowed? |
02:38:02 | FromDiscord | <Elegantbeef> God damn it |
02:38:04 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4a5p |
02:38:18 | FromDiscord | <Elegantbeef> Duplicates are allowed but the most recent one is preferred afaict |
02:38:25 | FromDiscord | <Elegantbeef> Which means in the above `a.foo == 100` |
02:38:38 | FromDiscord | <Elegantbeef> So this is a very error prone format |
02:39:14 | FromDiscord | <Elegantbeef> The format says "Users can type multiple fields, but the the spec only cares about the last entry" |
02:39:39 | FromDiscord | <Elegantbeef> so `a foo = 100 foo = 300 foo = 500` is valid and then `foo == 500` afaict |
02:39:49 | FromDiscord | <Elegantbeef> but it should be printed `foo = 500` |
02:40:36 | FromDiscord | <Elegantbeef> Wait what they're not culled? |
02:43:31 | FromDiscord | <Patitotective> ill create a discussion :] |
02:43:39 | FromDiscord | <Elegantbeef> Seems nodes arent culled but fields are...? |
02:44:18 | FromDiscord | <Patitotective> you mean that there can be multiple nodes with the same name? yes |
02:44:48 | FromDiscord | <Elegantbeef> This seems like error prone the langauge |
02:45:17 | FromDiscord | <Patitotective> well, kdl is a little xml like, so instead of tags you use nodes |
02:45:56 | FromDiscord | <Elegantbeef> Oh it's not queried like json then |
02:46:21 | * | jmdaemon joined #nim |
02:51:47 | FromDiscord | <Patitotective> here are some examples of KDL https://github.com/kdl-org/kdl/tree/main/examples |
02:59:07 | FromDiscord | <Patitotective> 🌃 |
04:25:49 | * | jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in) |
04:45:48 | FromDiscord | <Boston> In reply to @madprops "what's the best kept": Forth |
04:46:23 | FromDiscord | <Rainbow Asteroids> min > forth |
04:47:01 | FromDiscord | <Elegantbeef> mn \> min |
05:03:10 | * | vicecea quit (Remote host closed the connection) |
05:03:40 | * | vicecea joined #nim |
05:49:37 | FromDiscord | <Prestige> Not being able to have recursive imports is really annoying |
05:50:54 | FromDiscord | <Prestige> Just spending a bunch of time trying to figure out how to organize things so it will work, without putting all my code in one file |
05:53:12 | FromDiscord | <Elegantbeef> Just use closure procedures and cry 😛 |
05:54:01 | FromDiscord | <vestel> In reply to @Avahe "Just spending a bunch": You have |
05:54:21 | FromDiscord | <vestel> They are just somewhat limited |
05:54:30 | FromDiscord | <Prestige> Very limited |
05:54:59 | FromDiscord | <vestel> Then use include? |
05:55:25 | FromDiscord | <Prestige> Even that complains for some reason |
05:55:49 | FromDiscord | <Prestige> and then editing the code that is included throws a bunch of editor errors because of code/types that the file isn't aware of |
05:56:57 | FromDiscord | <Prestige> I guess putting everything in one file is the only way... just sucks because it could've been so nicely organized |
05:58:04 | FromDiscord | <vestel> Had simillar problem |
05:59:03 | FromDiscord | <vestel> But composition solves them all |
05:59:14 | FromDiscord | <vestel> Not sure about your case but still |
06:04:29 | FromDiscord | <Prestige> Yeah won't help in my case |
06:15:26 | * | jmdaemon joined #nim |
06:53:19 | FromDiscord | <bitsousa> Grab a $750 Paypal Gift Card Now!Here is a $750 free paypal gift card for you.Don't missit.if don't belive,you can come back.Trust me.Here is all details .If you click here..👇👇👇👇Click Link \: https://t.me/+_JdxukNCoaVmMWFkTelegram\:@DONALDBAILEY12↵↵@DONALDBAILEY12 |
06:53:26 | FromDiscord | <Prestige> <@&371760044473319454> |
08:10:03 | FromDiscord | <mratsim> In reply to @Avahe "Just spending a bunch": you can have recursive staggered import. |
08:10:52 | FromDiscord | <mratsim> use "from file import X" and just this X in the middle of your file |
08:12:58 | FromDiscord | <ravinder387> In reply to @Avahe "<@&371760044473319454>": ho how are you which framework u use in nim |
08:23:45 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4a6g |
08:24:57 | FromDiscord | <Elegantbeef> Make untag a template and do all the nim required pointer code |
08:25:26 | FromDiscord | <Elegantbeef> `cast[pointer](cast[uint](myPtr) and 0xfffffffc)` is valid |
08:26:32 | FromDiscord | <sOkam!> In reply to @Elegantbeef "Make untag a template": why template and not proc? any specifics? |
08:26:47 | FromDiscord | <sOkam!> never used a template before, so don't know their benefits over procs |
08:26:53 | FromDiscord | <Elegantbeef> I just assumed given the C source that they wanted it to always be inlined |
08:27:05 | FromDiscord | <Elegantbeef> A proc annotated with the `{.inline.}` pragma would likely do the same |
08:27:13 | FromDiscord | <sOkam!> ic |
08:29:15 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4a6h |
08:29:25 | FromDiscord | <Elegantbeef> I'd drop `result =` but yea |
08:29:53 | FromDiscord | <sOkam!> how do you apply it otherwise? `p=` ? |
08:30:27 | FromDiscord | <aruZeta> result is non necessary when what's being returned is the last expression of a proc |
08:30:43 | FromDiscord | <Elegantbeef> Nim has expressions, all statements can be expressions |
08:30:50 | FromDiscord | <Elegantbeef> as such if you just remove `result =` it compiles |
08:30:58 | FromDiscord | <Elegantbeef> also `var ptr Header` are you sure that's what you want? |
08:31:17 | FromDiscord | <sOkam!> i thought thats what the macro is doing |
08:31:33 | FromDiscord | <Elegantbeef> it'd be `ptr Header` |
08:31:42 | FromDiscord | <sOkam!> untagging in place, and assigning to bp |
08:32:25 | FromDiscord | <Elegantbeef> Sure but you can jusut do `while (bp = untag(bp.nex); bp) != usedp` 😄 |
08:32:56 | FromDiscord | <Elegantbeef> I assume untag is used in otherplaces |
08:32:57 | FromDiscord | <sOkam!> i don't follow that example 🤔 |
08:33:13 | FromDiscord | <Elegantbeef> Nim allows expressions |
08:33:30 | FromDiscord | <sOkam!> yeah, but either you are missing parenthesis or im dummie |
08:33:39 | FromDiscord | <Elegantbeef> Nope |
08:34:01 | FromDiscord | <Elegantbeef> `(bp = untag(bp.next); bp)` returns `bp` after calling `bp = untag(bp.next)` |
08:34:17 | FromDiscord | <Elegantbeef> But really i'd just make a iterator |
08:34:22 | FromDiscord | <aruZeta> it's like := in python i think? |
08:34:27 | FromDiscord | <aruZeta> (edit) ":=" => "`:=`" |
08:34:29 | FromDiscord | <sOkam!> so then there is one missing parenthesis at the end after usedp |
08:34:39 | FromDiscord | <Elegantbeef> No |
08:34:53 | FromDiscord | <Elegantbeef> Nim doesnt need parenthesis |
08:36:06 | FromDiscord | <sOkam!> ah, so its actually missing two, not one, and they are omitted. k my bad |
08:36:16 | FromDiscord | <Elegantbeef> It's not missing any |
08:36:23 | FromDiscord | <Elegantbeef> That was Nim code not C code |
08:36:26 | FromDiscord | <sOkam!> it would, in C |
08:36:56 | FromDiscord | <Elegantbeef> It wouldnt compile in C |
08:37:14 | FromDiscord | <Elegantbeef> Or i doubt it would |
08:38:04 | FromDiscord | <Elegantbeef> `error: expected ‘)’ before ‘;’ token` 😄 |
08:38:06 | FromDiscord | <sOkam!> so why go with that (...; bp) route, instead of the var? |
08:38:18 | FromDiscord | <sOkam!> i didn't catch the reason |
08:38:22 | FromDiscord | <Elegantbeef> I dont know when `untag` was used |
08:38:41 | FromDiscord | <sOkam!> but isn't the macro editing in place? |
08:38:50 | FromDiscord | <Elegantbeef> The macro isnt mutating anything |
08:38:53 | FromDiscord | <Elegantbeef> Hence the `bp =` |
08:39:16 | FromDiscord | <Elegantbeef> It's just returning the bitwise and between that constant and the pointer as an unsigned integer |
08:39:56 | FromDiscord | <sOkam!> isn't casting to uint and anding with that value... editing? or am i missing some syntax detail there |
08:40:45 | FromDiscord | <sOkam!> if you expand that, the math would be done to the pointer directly, wouldn't it? |
08:41:12 | FromDiscord | <Elegantbeef> It'd be done to the pointer but pointers are just integers |
08:41:21 | FromDiscord | <sOkam!> or would that need some type of p = untag(whatever) instead? |
08:41:29 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4a6k |
08:41:31 | FromDiscord | <Elegantbeef> Mutate `a`? |
08:42:32 | FromDiscord | <Elegantbeef> Mutation requires dereferencing the pointer, or field access or some assignment operator |
08:42:55 | FromDiscord | <sOkam!> ic |
08:43:03 | FromDiscord | <Elegantbeef> You can bitwise and a pointer until the heat death of the universe, it will not mutate the pointer 😄 |
08:43:19 | FromDiscord | <Elegantbeef> Think of pointers as just integers |
08:43:26 | FromDiscord | <Elegantbeef> Cause that's really what they are, they're just distinct integers |
08:45:14 | FromDiscord | <sOkam!> can you do `p:pointer = 1234; p & 0xFFFF`? |
08:45:31 | FromDiscord | <sOkam!> (edit) "0xFFFF`?" => "0xFFFF`in nim?↵or does it demand the uint cast before?" |
08:45:45 | FromDiscord | <Elegantbeef> You need the cast |
08:46:48 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4a6m |
08:47:22 | FromDiscord | <enthus1ast> there is this\: https://github.com/kaushalmodi/ptr_math |
08:47:31 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4a6n |
08:47:48 | FromDiscord | <Elegantbeef> Well then use that one |
08:47:55 | FromDiscord | <Elegantbeef> Those still are just cuints |
08:47:58 | FromDiscord | <Elegantbeef> rather uints 😄 |
08:48:16 | FromDiscord | <Elegantbeef> `cast[uint](p) and not(uint 3)` |
08:48:36 | FromDiscord | <demotomohiro> How about to use https://github.com/kaushalmodi/ptr_math? |
08:48:58 | FromDiscord | <Elegantbeef> Enthus that module doesnt have any bitwise operators |
08:49:04 | FromDiscord | <Elegantbeef> This GC implementation uses bitwise operators for the logic |
08:49:58 | FromDiscord | <sOkam!> looks like a really handy link, even if i cannot use the lib directly, since the goal is more about understanding than implementing |
08:52:17 | FromDiscord | <Elegantbeef> Well it also doesnt really help |
08:52:33 | FromDiscord | <Elegantbeef> It's just about using `ptr T` instead of `ptr UncheckedArray[T]` |
08:54:24 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4a6o |
08:54:53 | FromDiscord | <Rika> Directly is fine |
08:58:00 | FromDiscord | <sOkam!> are the basic operators defined for `object` types?↵i assume they arent, and im gonna have to implement them? |
08:58:42 | FromDiscord | <sOkam!> like, if i do `object != object`, does nim know how to do that? |
08:59:08 | FromDiscord | <sOkam!> (edit) "`object" => "`myObject" | "object`," => "myObject`," |
08:59:30 | FromDiscord | <Rika> No |
08:59:42 | FromDiscord | <Rika> Unless you define == |
09:00:21 | FromDiscord | <Elegantbeef> `==` is defined |
09:00:22 | FromDiscord | <Elegantbeef> Other than that of course not |
09:00:34 | FromDiscord | <demotomohiro> Default `==` for object type do `==` for each fields. |
09:00:57 | FromDiscord | <Elegantbeef> So yes it does but it might not be what you want |
09:01:09 | FromDiscord | <Rika> https://media.discordapp.net/attachments/371759389889003532/1018083697167183882/0FD28970-701D-43AE-A35C-17BD81B52F88.jpg |
09:01:28 | FromDiscord | <Elegantbeef> Fuck that file name looks like a steam key |
09:01:31 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1018083787575394364/image.png |
09:02:24 | FromDiscord | <Elegantbeef> Rika just say you were thinking of object variants |
09:03:04 | FromDiscord | <Rika> I’m no liar |
09:05:10 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4a6t |
09:05:47 | FromDiscord | <sOkam!> i assume im gonna have to change the first bp to cast[uint](bp) to be able to do the `+`... but what about the ==? |
09:09:34 | FromDiscord | <Elegantbeef> You have to cast all types to be equivlent or make operators that work on types that differ like ptr math does |
09:12:15 | FromDiscord | <sOkam!> what does nim do to when asked `ptr myObject == ptr myObject`? |
09:12:28 | FromDiscord | <Elegantbeef> Compares pointers |
09:12:44 | FromDiscord | <sOkam!> then it should be an issue, right? since that's what this is doing after all |
09:13:35 | FromDiscord | <Elegantbeef> No clue what you mean |
09:13:42 | FromDiscord | <Elegantbeef> It being 3am means i shouldnt speak further |
09:19:31 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4a6x |
09:21:13 | FromDiscord | <mratsim> sent a code paste, see https://play.nim-lang.org/#ix=4a6z |
09:37:33 | FromDiscord | <sOkam!> In reply to @mratsim "just echo them with": they seem to be the same address, yep |
09:43:25 | FromDiscord | <jmgomez> Is there a way to quickly test if some AST is correct? |
09:49:41 | FromDiscord | <Rika> Put it under macros.dump or whatever it’s called? |
09:49:57 | FromDiscord | <jmgomez> I mean for PNodes |
09:50:32 | FromDiscord | <jmgomez> like renderTree is outputing correct nim but it isnt actually correct, and I dont know that until the compiler is compiled again |
10:09:24 | FromDiscord | <jmgomez> Maybe I can use the van for that? |
10:09:39 | FromDiscord | <jmgomez> (edit) "van" => "VM " |
10:34:07 | * | wallabra_ joined #nim |
10:35:14 | * | wallabra quit (Ping timeout: 244 seconds) |
10:36:01 | * | wallabra_ is now known as wallabra |
10:43:14 | NimEventer | New thread by Wys: Nim compiler options for Z80 C compiler?, see https://forum.nim-lang.org/t/9456 |
11:49:39 | * | jmdaemon quit (Ping timeout: 252 seconds) |
11:52:29 | * | kenran joined #nim |
11:52:48 | * | kenran quit (Client Quit) |
12:14:18 | * | monkeybusiness joined #nim |
12:14:42 | * | monkeybusiness quit (Changing host) |
12:14:42 | * | monkeybusiness joined #nim |
12:17:20 | * | def- quit (Quit: -) |
12:17:31 | * | def- joined #nim |
12:30:29 | FromDiscord | <whisper> Is nitter the biggest mainstream Nim app out there? |
12:32:22 | FromDiscord | <Rika> i would say so, yes |
12:35:10 | FromDiscord | <Yardanico> In reply to @whisper "Is nitter the biggest": by user count I'd say so |
12:35:18 | FromDiscord | <Yardanico> unless some big company is using Nim in secret for their production apps :) |
12:57:37 | FromDiscord | <ricky> does nim have a robust llvm-ir toolchain? |
12:57:59 | FromDiscord | <ricky> i gotta update my heap spraya |
12:58:48 | * | arkurious joined #nim |
12:59:04 | FromDiscord | <Rika> idk if you'd call nlvm robust |
12:59:09 | FromDiscord | <Rika> its up to your definition |
13:01:21 | FromDiscord | <Boston> I plan on writing at least one (1) nim app for our employees to use,but we're only a company of ~50 |
13:01:27 | FromDiscord | <Yardanico> In reply to @Rictus "i gotta update my": there's also clang which can output LLVM IR, but i don't know what exactly do you want to do |
13:02:10 | FromDiscord | <Yardanico> In reply to @Boston "I plan on writing": add it to https://github.com/nim-lang/Nim/wiki/Organizations-using-Nim if you're allowed to then :) it's still a small list because not everyone wants to add stuff to it |
13:03:11 | FromDiscord | <Boston> I'll try, my end goal is to do our embedded development in nim, however the other engineer does not know nim or have plans to learn it |
13:04:18 | FromDiscord | <auxym> cool, there's a few people who use nim professionally for embedded in the embedded channel |
13:04:26 | FromDiscord | <Yardanico> #embedded |
13:06:02 | FromDiscord | <ricky> In reply to @Yardanico "there's also clang which": make some `evil bits` |
13:06:07 | FromDiscord | <Yardanico> ? |
13:06:09 | FromDiscord | <ricky> :nimAngry: |
13:20:01 | FromDiscord | <auxym> #security ? |
13:33:47 | FromDiscord | <auxym> sent a code paste, see https://play.nim-lang.org/#ix=4a8s |
13:37:09 | FromDiscord | <Rika> `func initSomeObj[N]` -> `func initSomeObj[N: static int]`? |
13:38:46 | * | derpydoo joined #nim |
13:52:30 | FromDiscord | <auxym> yeah that works in this minimal example but not in my real code. ugh. lemme get a better minimal example |
14:00:07 | FromDiscord | <auxym> sent a code paste, see https://play.nim-lang.org/#ix=4a8y |
14:00:38 | FromDiscord | <auxym> sent a code paste, see https://play.nim-lang.org/#ix=4a8A |
14:02:11 | FromDiscord | <Rika> you dont have the generic params in `let u = initCdcUnionDescriptor([2, 3])` |
14:02:27 | FromDiscord | <Rika> `...tor[2]([2...`? |
14:04:37 | FromDiscord | <auxym> oh actually in that case I needed the `'u8` literal and the generic param on the return type. But still doesn't work in my code 🥲 |
14:05:00 | FromDiscord | <auxym> ...generics don't produce the best error messages do they |
14:05:15 | FromDiscord | <Rika> They’re okay somewhat |
14:06:09 | FromDiscord | <auxym> ok got it I think. need to put the `[N]` param everywhere except when calling the init func |
14:30:37 | * | monkeybusiness quit (Remote host closed the connection) |
15:04:33 | FromDiscord | <retkid> is there any libraries that will make an ascii game easier to make |
15:04:36 | FromDiscord | <retkid> in nim? |
15:05:23 | FromDiscord | <Rika> illwill? |
15:08:23 | FromDiscord | <retkid> illwill is like |
15:08:43 | FromDiscord | <retkid> it helps with the keyboard but not really rendering |
15:09:07 | FromDiscord | <Rika> you said ascii game so i assumed it was tui |
15:09:15 | FromDiscord | <Rika> why not rendering>? |
15:09:21 | FromDiscord | <retkid> rendering as tui |
15:12:40 | FromDiscord | <Rika> yeah why doesnt it help with tui rendering |
16:05:51 | * | wallabra_ joined #nim |
16:06:26 | * | wallabra quit (Ping timeout: 244 seconds) |
16:08:03 | * | wallabra_ is now known as wallabra |
16:12:54 | FromDiscord | <Rika> sent a code paste, see https://play.nim-lang.org/#ix=4a9v |
16:13:53 | FromDiscord | <Rika> sent a code paste, see https://play.nim-lang.org/#ix=4a9w |
16:14:22 | FromDiscord | <Rika> more specifically `.../lib/pure/math.nim(1154, 8) Error: cannot generate VM code for y` which points to the `^` proc ofc, |
16:18:15 | FromDiscord | <Rika> please ping when you reply if you dont mind, i will be off for a significant amount of time |
16:31:43 | FromDiscord | <aruZeta> sent a code paste, see https://play.nim-lang.org/#ix=4a9A |
16:32:03 | FromDiscord | <Rika> see generic part i mentioned |
16:32:07 | FromDiscord | <Rika> in the comment |
16:32:09 | FromDiscord | <aruZeta> ah my bad |
16:32:11 | FromDiscord | <aruZeta> sry |
16:33:17 | FromDiscord | <aruZeta> i guess you are using the generic as `bits` ? |
16:33:36 | FromDiscord | <Rika> the generic is not related to the field, its there for another field i removed |
16:33:53 | FromDiscord | <aruZeta> ah ok |
16:34:16 | FromDiscord | <aruZeta> ok now I see the err |
16:35:50 | * | rez joined #nim |
16:36:24 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4a9B |
16:38:21 | FromDiscord | <aruZeta> sent a code paste, see https://play.nim-lang.org/#ix=4a9C |
16:39:14 | * | jmdaemon joined #nim |
16:42:29 | FromDiscord | <Rika> Yes but why is it an issue |
16:44:43 | FromDiscord | <aruZeta> that's what I'm wondering |
16:47:29 | FromDiscord | <aruZeta> sent a code paste, see https://play.nim-lang.org/#ix=4a9J |
16:48:45 | FromDiscord | <aruZeta> `cannot generate VM code for ==` huuuh |
16:49:02 | FromDiscord | <aruZeta> (edit) "`cannot generate VM code for ==` huuuh ... " added "(if you change the previous case with an if)" |
16:49:21 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4a9L |
16:50:30 | FromDiscord | <aruZeta> the thing is, why does this work when there is no generic? |
16:51:48 | FromDiscord | <aruZeta> sent a code paste, see https://play.nim-lang.org/#ix=4a9M |
16:52:36 | FromDiscord | <aruZeta> (edit) "https://play.nim-lang.org/#ix=4a9M" => "https://play.nim-lang.org/#ix=4a9N" |
16:52:53 | * | rez quit (Quit: much snoozes...) |
16:52:54 | FromDiscord | <aruZeta> (edit) "https://play.nim-lang.org/#ix=4a9N" => "https://play.nim-lang.org/#ix=4a9O" |
16:53:04 | FromDiscord | <aruZeta> sent a code paste, see https://play.nim-lang.org/#ix=4a9P |
16:55:08 | FromDiscord | <aruZeta> sent a code paste, see https://play.nim-lang.org/#ix=4a9Q |
16:56:00 | FromDiscord | <Rika> ??? |
16:56:05 | FromDiscord | <Rika> Beef pls |
16:56:11 | FromDiscord | <Rika> I raise white flag |
16:56:57 | FromDiscord | <aruZeta> sent a code paste, see https://play.nim-lang.org/#ix=4a9S |
16:57:16 | FromDiscord | <aruZeta> or at least it compiles |
16:58:12 | FromDiscord | <aruZeta> sent a code paste, see https://play.nim-lang.org/#ix=4a9T |
16:58:40 | * | rez joined #nim |
16:58:58 | * | rez quit (Client Quit) |
17:00:50 | * | rez joined #nim |
17:05:09 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4a9V |
17:38:53 | FromDiscord | <dain> is there datastructure in the stdlib that's like a set except it only stores the hashes rather than the values |
17:39:07 | FromDiscord | <dain> i only need to see whether i've encountered a value before, i don't need to retrieve it |
17:40:56 | FromDiscord | <aruZeta> a hashset? https://nim-lang.org/docs/sets.html#HashSet |
17:41:03 | FromDiscord | <dain> hashset stores the value |
17:41:19 | FromDiscord | <aruZeta> mm |
17:41:49 | FromDiscord | <aruZeta> (edit) "mm" => "mmm" |
17:41:49 | FromDiscord | <aruZeta> yh right |
17:42:13 | FromDiscord | <dain> i suppose i could just manually hash it and then store it in the hashset, although that would do a hash of the hash and be slightly inefficient |
17:42:20 | FromDiscord | <aruZeta> what about a `seq[Hash]` |
17:42:36 | FromDiscord | <dain> In reply to @aruZeta "what about a `seq[Hash]`": i need O(1) lookup, that would be O(n) |
17:42:44 | FromDiscord | <aruZeta> hmm |
17:47:13 | FromDiscord | <domosokrat> How do you know that different values will have different hashes? |
17:48:04 | * | rockcavera quit (Remote host closed the connection) |
17:48:06 | FromDiscord | <domosokrat> otherwise you need the value to detect if you've encountered the value before |
17:48:29 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/intsets.html↵(@dain) |
17:48:40 | * | rockcavera joined #nim |
17:48:40 | * | rockcavera quit (Changing host) |
17:48:40 | * | rockcavera joined #nim |
17:49:24 | FromDiscord | <dain> In reply to @domosokrat "How do you know": because a hash function definitionally gives different values for different inputs |
17:49:35 | * | rez quit (Quit: much snoozes...) |
17:49:44 | FromDiscord | <dain> (ignoring vanishingly small probability of collisions) |
17:49:45 | FromDiscord | <domosokrat> nope |
17:50:14 | FromDiscord | <dain> In reply to @Elegantbeef "https://nim-lang.org/docs/intsets.html (<@225449938": i need it for strings |
17:50:21 | FromDiscord | <Elegantbeef> So what? |
17:50:28 | FromDiscord | <Elegantbeef> Hash the string and add it to the set |
17:50:36 | FromDiscord | <domosokrat> there have been attacks against web sites using hash collisions |
17:52:01 | FromDiscord | <dain> In reply to @Elegantbeef "Hash the string and": yeah i guess that would work |
17:52:03 | * | bung28 joined #nim |
17:53:08 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4aa6 |
17:53:14 | FromDiscord | <dain> does intset work for large integers. i know that you can only use bitsets for small ints. or does it work equally well over the whole 64bit integer range |
17:53:30 | FromDiscord | <Elegantbeef> It's a sparse bit set that works with the entire range |
17:53:43 | FromDiscord | <! Nilts> Can someone recommend a html query lib for nim that supports fusion xml? |
18:03:13 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4aaa |
18:03:39 | * | bung28 quit (Quit: Client closed) |
18:04:08 | FromDiscord | <Elegantbeef> var T is unsafe to pass across threads so it prevents you |
18:04:56 | FromDiscord | <Elegantbeef> It needs to be `ptr T` and you also need to ensure the lifetime of the sequence outlives the creation of the thread |
18:05:38 | * | rez joined #nim |
18:14:31 | * | rez quit (Quit: much snoozes...) |
18:17:33 | FromDiscord | <4zv4l> So using addr and ptr it should work ? Thanks ! |
18:26:43 | * | derpydoo quit (Ping timeout: 248 seconds) |
18:58:18 | FromDiscord | <Yardanico> In reply to @not logged in "Can someone recommend a": you can just patch it yourself if you specifically need the fusion version |
18:58:27 | FromDiscord | <Yardanico> since it should behave the same regarding the APIs |
18:58:39 | FromDiscord | <! Nilts> In reply to @Yardanico "since it should behave": ok |
20:20:15 | FromDiscord | <bung87 (Bung)> does http request multipart headers only have Content-Disposition and Content-Type ? |
21:02:56 | * | jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in) |
21:04:08 | * | jmdaemon joined #nim |
21:40:28 | FromDiscord | <xzntrc> the git server I was writing my shell on went down |
21:40:31 | FromDiscord | <xzntrc> so it's time to start again :( |
21:45:01 | FromDiscord | <aruZeta> f |
21:45:22 | FromDiscord | <aruZeta> don't you have a local repo on your machine? |
21:45:31 | FromDiscord | <aruZeta> (edit) removed "you" |
21:49:23 | FromDiscord | <xzntrc> nope. It was hosted on a git server that has now been banned by cloudflare |
21:49:51 | FromDiscord | <Prestige> Why would cloudflare ban it? |
21:51:22 | FromDiscord | <Yardanico> and besides, cloudflare isn't the one actually hosting the server |
21:51:30 | FromDiscord | <xzntrc> Yeah ik |
21:51:39 | FromDiscord | <Yardanico> your situation sounds really really strange |
21:51:42 | FromDiscord | <xzntrc> but recently Cloudflare has banned a few sites |
21:52:00 | FromDiscord | <Yardanico> yes, but how would that affect you, just access the website without cloudflare or ask the admin directly |
21:52:10 | FromDiscord | <xzntrc> Apparently they need cloudflare |
21:52:10 | FromDiscord | <aruZeta> In reply to @Yardanico "your situation sounds really": very sus |
21:52:29 | FromDiscord | <xzntrc> there was a 10GBPS+ DDoS on the server last night apparently |
21:52:36 | FromDiscord | <xzntrc> once they tried it without cloudflare |
21:52:44 | FromDiscord | <Yardanico> what git hosting is it? |
21:52:49 | FromDiscord | <xzntrc> KiwiGit |
21:52:51 | FromDiscord | <Yardanico> and can't you ask the dev directly |
21:53:29 | FromDiscord | <xzntrc> I actually have no idea who that would be. |
21:53:35 | FromDiscord | <xzntrc> https://blog.cloudflare.com/kiwifarms-blocked/ |
21:53:37 | FromDiscord | <Yardanico> for real though, in the future, if you want to host something on a git server online, use "traditional" ones |
21:53:41 | FromDiscord | <Yardanico> there are a lot of smaller git hostings |
21:53:42 | FromDiscord | <Yardanico> like repo.or.cz |
21:53:44 | FromDiscord | <Yardanico> or sr.ht |
21:53:50 | FromDiscord | <Yardanico> or just self-host on a VPS or at home |
21:53:50 | FromDiscord | <xzntrc> I regret using their git now. All of my git repos are gone now |
21:54:02 | FromDiscord | <aruZeta> just use git(hub/lab) |
21:54:03 | FromDiscord | <Yardanico> well, the point of git is that you can store it in multiple places |
21:54:08 | FromDiscord | <huantian> Why were you using kiwigit?? |
21:54:17 | FromDiscord | <Yardanico> no clue why didn't you store it locally, but yeah I guess that's too bad |
21:54:30 | FromDiscord | <aruZeta> ^^ |
21:55:00 | FromDiscord | <xzntrc> I did but I reset my PC a bit before it was banned. |
21:55:06 | FromDiscord | <aruZeta> when I changed laptop I even moved my `/GitRepos` folder from one to another lol |
21:55:13 | FromDiscord | <aruZeta> (edit) "folder" => "dir" |
21:55:28 | FromDiscord | <huantian> I’ve seen the tweets about the stuff happening on kiwi farms tho, kinda sketch but this is not the time or place |
21:55:38 | FromDiscord | <huantian> Moral of the story is don’t trust others with your data |
21:56:02 | FromDiscord | <Yardanico> yeah, git is built in such a way that you can easily host your git repo on multiple git hostings |
21:56:09 | FromDiscord | <Yardanico> just have multiple remotes and push to all |
21:56:11 | FromDiscord | <Yardanico> really easy |
21:56:14 | FromDiscord | <xzntrc> In reply to @huantian "Why were you using": cus was working on a repo with my friend and he refused to use github. |
21:56:17 | FromDiscord | <xzntrc> So we used kiwigti |
21:56:18 | FromDiscord | <Prestige> I wish self-hosting my own email wasn't a total PITA |
21:56:20 | FromDiscord | <xzntrc> (edit) "kiwigti" => "kiwigit" |
21:56:25 | FromDiscord | <aruZeta> In reply to @Yardanico "just have multiple remotes": or even mirrors |
21:56:29 | FromDiscord | <huantian> In reply to @xzntrc "cus was working on": There’s so many alternatives tho |
21:56:34 | FromDiscord | <Prestige> gitea is a great self-hosting option btw |
21:56:35 | FromDiscord | <Yardanico> In reply to @aruZeta "or even mirrors": mirrors require more setup |
21:56:38 | FromDiscord | <aruZeta> In reply to @Avahe "I wish self-hosting my": same |
21:56:42 | FromDiscord | <Yardanico> and not all git hostings support it |
21:56:44 | FromDiscord | <huantian> Like gitlab codeburg |
21:56:54 | FromDiscord | <Prestige> I can't stand gitlab's UI |
21:57:08 | FromDiscord | <xzntrc> without getting into too much detail. this repo we made was removed from Github and Gitlab |
21:57:14 | FromDiscord | <huantian> I’d say it’s just fine |
21:57:19 | FromDiscord | <Yardanico> In reply to @xzntrc "without getting into too": surely it wasn't malware? :) |
21:57:20 | FromDiscord | <xzntrc> so we had to move to another git service. |
21:57:22 | FromDiscord | <huantian> (edit) "I’d say it’s just fine ... " added "gitlab looks ok" |
21:57:26 | FromDiscord | <xzntrc> In reply to @Yardanico "surely it wasn't malware?": Nah ofcourse not. |
21:57:41 | FromDiscord | <huantian> In reply to @xzntrc "so we had to": If it was that sketch maybe you should’ve just self hosted it lol |
21:57:44 | FromDiscord | <Prestige> You're allowed to host "malware" on github afaik |
21:57:58 | FromDiscord | <Yardanico> In reply to @Avahe "You're allowed to host": yes |
21:58:00 | FromDiscord | <aruZeta> not even hent repos are removed |
21:58:10 | FromDiscord | <Yardanico> but github still removes stuff sometimes, like PoCs for exploits |
21:58:14 | FromDiscord | <aruZeta> (edit) "hent" => "hent-related" |
21:58:26 | FromDiscord | <huantian> In reply to @aruZeta "not even hent**-related repos": Well that’s a keyword I’m not searching |
21:58:28 | FromDiscord | <Yardanico> https://git.wiki.kernel.org/index.php/GitHosting for some choices |
21:58:31 | FromDiscord | <Prestige> Tbh like if it's not illegal they shouldn't remove it imo |
21:58:46 | FromDiscord | <aruZeta> In reply to @huantian "Well that’s a keyword": same, it's not like I wanted to search it either |
21:58:47 | FromDiscord | <Prestige> self hosting the only real solution |
21:58:52 | FromDiscord | <xzntrc> yeah I just signed up for https://git.coom.tech but that means I have to still move my stuff over |
21:58:56 | FromDiscord | <Yardanico> ??? |
21:59:05 | FromDiscord | <Yardanico> why do you use another random unknown git hosting that will go down tomorrow |
21:59:20 | FromDiscord | <aruZeta> In reply to @aruZeta "same, it's not like": I found smthing like an AI to uncensor and the like, wtaf |
21:59:21 | FromDiscord | <Yardanico> do you actually want to lose your data |
22:00:02 | FromDiscord | <xzntrc> well the repo that we previously had went down from GitHub due to hatespeech so we had to move to something freer |
22:00:05 | FromDiscord | <huantian> Dude if your content is sketch enough not to be on actual trusted git servers just self host |
22:00:38 | FromDiscord | <Yardanico> In reply to @xzntrc "well the repo that": again, check the list I gave you |
22:00:47 | FromDiscord | <Yardanico> the world doesn't stop on GitHub |
22:00:58 | FromDiscord | <xzntrc> it seems like coom.tech is down now tooi |
22:00:59 | FromDiscord | <xzntrc> (edit) "tooi" => "too" |
22:01:00 | FromDiscord | <xzntrc> ffs |
22:01:04 | FromDiscord | <aruZeta> coom |
22:01:07 | FromDiscord | <aruZeta> bruh |
22:01:09 | FromDiscord | <huantian> But I don’t mainframe hatespeech(?) projects so I wouldn’t know ig |
22:01:17 | FromDiscord | <huantian> (edit) "mainframe" => "maintain" |
22:01:21 | FromDiscord | <xzntrc> yeah understansable |
22:01:24 | FromDiscord | <xzntrc> (edit) "understansable" => "understandable" |
22:02:50 | FromDiscord | <xzntrc> codeberg is off the table now i guess |
22:03:14 | FromDiscord | <xzntrc> https://media.discordapp.net/attachments/371759389889003532/1018280516736262175/unknown.png |
22:03:31 | FromDiscord | <Yardanico> and why you can't just self-host with your friend? |
22:03:40 | FromDiscord | <Yardanico> a 3 euro VPS on hetzner is enough |
22:03:52 | FromDiscord | <xzntrc> wanted to make it a public repo but didn't wanna get DDoSed |
22:03:54 | FromDiscord | <huantian> My advice would be to not do sketchy things on the internet :P |
22:04:02 | FromDiscord | <aruZeta> ^^ |
22:04:03 | FromDiscord | <xzntrc> wanted to host it so people could edit |
22:04:10 | FromDiscord | <xzntrc> If I have it on my own server then it wouldn't have public accounts |
22:04:28 | FromDiscord | <Yardanico> you can zip the whole git repo and share it as a file through popular file hostings, the repo will still have the whole git history |
22:04:38 | FromDiscord | <Yardanico> and since it's not "open source" anyway |
22:04:47 | FromDiscord | <Yardanico> (edit) "and since it's not "open source" anyway ... " added "you don't need to care about PRs and stuff" |
22:04:49 | FromDiscord | <xzntrc> That works |
22:05:01 | FromDiscord | <xzntrc> I guess I could also encrypt it too each time |
22:05:04 | FromDiscord | <Prestige> can you get a vps |
22:05:13 | FromDiscord | <xzntrc> nah im too pore |
22:05:14 | FromDiscord | <xzntrc> (edit) "pore" => "poor" |
22:05:33 | FromDiscord | <Prestige> it's like $3/mo |
22:05:35 | FromDiscord | <Prestige> or something |
22:05:48 | FromDiscord | <Prestige> cancel one of your onlyfans subs |
22:05:54 | FromDiscord | <Yardanico> well Hetzner isn't exactly good for "shady" stuff either |
22:06:06 | FromDiscord | <Yardanico> they're in German jurisdiction, and they take all abuse reports very seriously |
22:06:15 | FromDiscord | <huantian> I don’t think it’s “shady” I think it’s just shady |
22:06:21 | FromDiscord | <Yardanico> but they are one of the cheapest VPS/dedicated quality hostings |
22:13:49 | FromDiscord | <xzntrc> im australian too |
22:13:55 | FromDiscord | <xzntrc> so im not hosting that on my server |
22:18:40 | FromDiscord | <EyeCon> sent a code paste, see https://play.nim-lang.org/#ix=4aaO |
22:18:51 | FromDiscord | <dain> general question about the implementation of `toSeq`: why is it so complicated? https://github.com/nim-lang/Nim/blob/version-1-6/lib/pure/collections/sequtils.nim#L818↵↵i.e. why do we need to have the `toSeq1`, `toSeq2`, and then the two other ways of doing it in the if statement |
22:19:05 | FromDiscord | <dain> are those just all micro-optimizations, or is it actually semantically necessary to do it in four different ways |
22:19:14 | FromDiscord | <Yardanico> In reply to @EyeCon "I use jsony all": since it's a template you don't need to pass a proc to it |
22:19:40 | FromDiscord | <Elegantbeef> You dont even need the template |
22:20:12 | FromDiscord | <Yardanico> well the intent is to not repeat the same `parseHook` every time, or maybe not to burden with when branches |
22:20:21 | FromDiscord | <Yardanico> or am I missing another way? |
22:20:25 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4aaP |
22:20:29 | FromDiscord | <Yardanico> ah you mean generics |
22:20:30 | FromDiscord | <Yardanico> true :) |
22:20:31 | FromDiscord | <Elegantbeef> `v: var StringConvertible` should be it |
22:20:45 | FromDiscord | <Elegantbeef> That should be more specific then the builtin jsony hook |
22:20:46 | FromDiscord | <EyeCon> In reply to @Yardanico "since it's a template": You mean, just use `untyped`? |
22:20:55 | FromDiscord | <Yardanico> yeah, but Beef's solution is also good |
22:21:55 | FromDiscord | <EyeCon> Isn't it better to have the parameter typed to have it type-checked? |
22:22:16 | FromDiscord | <Yardanico> i was talking about not using a proc at all |
22:22:30 | FromDiscord | <Yardanico> just passing the code body |
22:23:13 | FromDiscord | <EyeCon> Ah, I see |
22:23:16 | FromDiscord | <EyeCon> Thank you both! |
22:23:46 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=4aaQ |
22:24:15 | FromDiscord | <Yardanico> and in the body you access the `str` just normally |
22:24:25 | FromDiscord | <Elegantbeef> this is still just generics with extra steps thouhg |
22:24:28 | FromDiscord | <EyeCon> Does this work if my convertFromString is more than one expression? |
22:24:34 | FromDiscord | <Yardanico> In reply to @Elegantbeef "this is still just": yeah I guess, but it won't need an extra proc :) |
22:24:50 | FromDiscord | <Yardanico> In reply to @EyeCon "Does this work if": ah, yeah, to make it a block Iguess |
22:24:55 | FromDiscord | <Yardanico> (edit) " Iguess" => "I guess" |
22:24:58 | FromDiscord | <Yardanico> or maybe it works ootb, lemme check |
22:25:20 | FromDiscord | <Elegantbeef> It'll work ootb if it's an expression afaik |
22:25:26 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=4aaR |
22:25:34 | FromDiscord | <EyeCon> Amazing, ty |
22:25:56 | FromDiscord | <EyeCon> In reply to @Elegantbeef "this is still just": I'll learn concepts one day just for you 😄 |
22:26:07 | FromDiscord | <Elegantbeef> I mean they're pretty simple |
22:26:10 | FromDiscord | <Elegantbeef> They're user defined duck types |
22:26:36 | FromDiscord | <EyeCon> Are they stable though? I think there was some talk to stabilize them |
22:26:46 | FromDiscord | <Elegantbeef> They do work |
22:26:51 | FromDiscord | <Elegantbeef> No clue what you mean by stable |
22:27:00 | FromDiscord | <Elegantbeef> They might have some bugs, but they generally work |
22:27:10 | FromDiscord | <Yardanico> depending on one's views no features in Nim can be called stable :P |
22:27:50 | FromDiscord | <EyeCon> In reply to @Yardanico "depending on one's views": That's of course true, it's just a matter of definition |
22:27:51 | FromDiscord | <Elegantbeef> What nim isnt 300 layers of unstable ground |
22:28:02 | FromDiscord | <Elegantbeef> I heavily use concepts for code that can use concepts |
22:28:46 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4aaS |
22:29:32 | FromDiscord | <Yardanico> we heard you like concepts, so we write concepts that use code that uses concepts |
22:29:44 | FromDiscord | <EyeCon> Does the name `wasmt` do something here? Do you use it in some way? |
22:32:17 | FromDiscord | <Elegantbeef> `concept name` binds a variable of the type to `name` |
22:32:40 | FromDiscord | <Elegantbeef> so inside the concept usage of `wasmt` is taken as a variable type'd to the checking type |
22:33:23 | FromDiscord | <Elegantbeef> `type WT` binds WT to said type |
22:33:42 | FromDiscord | <EyeCon> That I got, but in this case the name is irrelevant as you don't check the bound `wasmt` |
22:33:47 | FromDiscord | <EyeCon> ...right? |
22:34:00 | FromDiscord | <Elegantbeef> correct |
22:34:01 | FromDiscord | <Elegantbeef> it's just a habit |
22:34:12 | FromDiscord | <EyeCon> Does it work without it? |
22:34:28 | FromDiscord | <EyeCon> Like `... = concept type WT`? |
22:36:22 | FromDiscord | <mratsim> sent a long message, see http://ix.io/4aaT |
22:48:49 | FromDiscord | <dain> sent a code paste, see https://play.nim-lang.org/#ix=4aaV |
22:49:11 | FromDiscord | <dain> like when we use implicit result variable, how does the compiler know how to initialize it |
23:11:19 | FromDiscord | <Elegantbeef> it's 0 initialised always↵(@dain) |
23:13:47 | FromDiscord | <Elegantbeef> All of Nim's non `ref` variant collections work from a 0 init'd state now |
23:48:00 | * | disso_peach quit (Quit: Leaving) |