00:00:02 | * | junland quit (Quit: %ZNC Disconnected%) |
00:00:07 | FromGitter | <ynfle> What are some good ast pattern matching libraries? Or ones that make traversing them simple? |
00:00:45 | * | junland joined #nim |
00:28:12 | FromDiscord | <notchris> @treeform just added a pr for fidget (typography) |
00:49:05 | * | a_chou joined #nim |
00:53:07 | FromDiscord | <treeform> @notchris I decided to split Font into Typeface and Font. Typeface now has the `.glyphs`. |
00:53:35 | FromDiscord | <ElegantBeef> Also i've been meaning to ask, is there any way to change the colour of font inline, without making a new text node? |
00:53:36 | FromDiscord | <treeform> If you see some thing using font.glyphs it should use font.typeface.glyphs now. |
00:53:40 | FromDiscord | <notchris> @treeform ah okay, i just made the pr because fidget wasn't running |
00:53:47 | FromDiscord | <notchris> thank you @treeform |
00:54:12 | FromDiscord | <treeform> I think I updated everything on my computer I might have missed some thing with depends or just did not push to github i'll check. |
00:54:19 | FromDiscord | <notchris> Thank you! |
00:54:59 | FromDiscord | <treeform> @ElegantBeef where do you wan to change the color? Fidget, Flippy, or Typography? |
00:55:05 | FromDiscord | <ElegantBeef> Fidget |
00:55:20 | FromDiscord | <treeform> just change the fill on a text node? |
00:55:31 | FromDiscord | <ElegantBeef> Yea but i mean so you can have multiple text colours in a single node |
00:56:21 | FromDiscord | <ElegantBeef> Was thinking something like richtext or similar could be used to annotate text colour, some escape characters |
00:56:36 | FromDiscord | <treeform> Oh like you want to say "Hey there `Red`" and have red be in red? |
00:56:42 | FromDiscord | <ElegantBeef> Yea |
00:56:52 | FromDiscord | <treeform> Sorry I don't have that implemented yet. |
00:57:13 | FromDiscord | <treeform> Its handled with text ranges in Figma. And that is the way I will do it too. |
00:57:39 | FromDiscord | <ElegantBeef> What's that look like? |
01:01:39 | FromDiscord | <treeform> I am not 100% sure. But figma calls it `characterStyleOverrides`. |
01:02:27 | FromDiscord | <treeform> This is how it looks in raw json: https://dpaste.org/MRB7 |
01:02:32 | FromDiscord | <treeform> so some thing that should look better |
01:03:17 | FromDiscord | <treeform> looks kind of crazy |
01:03:22 | FromDiscord | <treeform> it has the string |
01:03:24 | FromDiscord | <ElegantBeef> Ah it's just indexed styles |
01:03:31 | FromDiscord | <treeform> then array for each char |
01:03:35 | FromDiscord | <treeform> then styles |
01:04:00 | FromDiscord | <treeform> I will probably have a nicer API, but it will be this in the back. |
01:04:24 | FromDiscord | <ElegantBeef> Could easily shoehorn rich text or whatever else in this |
01:05:12 | FromDiscord | <treeform> sent a code paste, see https://play.nim-lang.org/#ix=2DmH |
01:05:14 | FromDiscord | <treeform> ^ probably some thing like this |
01:06:55 | FromDiscord | <ElegantBeef> Yea i was thinking of using fidget for a text editor, but ehh that's on a long line of things i want to do ๐ |
01:08:05 | * | Cthalupa quit (Ping timeout: 240 seconds) |
01:08:57 | * | Cthalupa joined #nim |
01:14:52 | FromDiscord | <treeform> Yes rich text is even harder then regular text. |
01:15:04 | FromDiscord | <treeform> If you want to be able to insert images and other layout |
01:15:07 | FromDiscord | <treeform> it gets harder and harder |
01:18:07 | FromDiscord | <ElegantBeef> Yea i'm just looking at normal text rendering with colour support, so it's not too hard for me to implement myself, just requires a bouchery of draw logic ๐ |
01:21:21 | FromDiscord | <Avatarfighter> Ok so basically |
01:21:36 | FromDiscord | <Daniel> is there any tutorial for nim with fidget/figma? |
01:21:41 | FromDiscord | <Avatarfighter> Just curious but I can't make my own syntax such as `proc`/`func` ? |
01:21:53 | FromDiscord | <ElegantBeef> You techncially can |
01:22:00 | FromDiscord | <treeform> Sorry fidget is still pretty alpha. |
01:22:03 | FromDiscord | <Avatarfighter> yeah I have a really nasty macro @ElegantBeef atm |
01:22:12 | FromDiscord | <ElegantBeef> you can define it with stropping |
01:23:07 | FromDiscord | <ElegantBeef> Oh misunderstood |
01:23:28 | FromDiscord | <ElegantBeef> No you cannot make your own syntax, any syntax needs to be parsed by nim, so you can make a DSL if the parser parses |
01:25:45 | FromDiscord | <ElegantBeef> See https://play.nim-lang.org/#ix=2DmL |
01:27:22 | FromDiscord | <Daniel> @treeform but is it usable, even in alpha? |
01:30:44 | FromDiscord | <ElegantBeef> It's |
01:57:06 | FromDiscord | <tinygiant> sent a code paste, see https://play.nim-lang.org/#ix=2DmQ |
01:59:15 | FromDiscord | <ElegantBeef> I just tried that code and OptionalFIelds isnt compilable due to using different sized arrays |
02:00:31 | FromDiscord | <tinygiant> The value array in each table row has to be the same size? |
02:01:13 | FromDiscord | <ElegantBeef> It's a homogenous datatype so you cannot store an `array[4, int]` into an `array[3, int]` |
02:01:23 | FromDiscord | <ElegantBeef> I dont get why it didnt complain there |
02:01:55 | FromDiscord | <ElegantBeef> Cause that toTable is basically just making a `Table[string, array[2, string]]` based off the first value |
02:02:35 | FromDiscord | <ElegantBeef> Can see the output here if interested https://play.nim-lang.org/#ix=2DmT |
02:03:40 | FromDiscord | <tinygiant> sent a code paste, see https://play.nim-lang.org/#ix=2DmU |
02:04:25 | * | abm quit (Read error: Connection reset by peer) |
02:05:57 | FromDiscord | <ElegantBeef> You're certainly doing something off https://play.nim-lang.org/#ix=2DmV |
02:06:24 | FromDiscord | <ElegantBeef> You can also just use `@[]` for a sequence instead of an array, so you dont need same sized values |
02:06:47 | FromDiscord | <ElegantBeef> I know this is in your proprietary software but any chance you can give more of the code? ๐ |
02:07:02 | FromDiscord | <ElegantBeef> You could just hire me as a consultant ๐ |
02:07:23 | FromDiscord | <Rika> Lol |
02:08:26 | FromDiscord | <tinygiant> Meh, the stuff I'm writing isn't proprietary, it's jsut the library I'm using to access the data I need. What else would you need to see? |
02:08:43 | FromDiscord | <Rika> Are they in other modules |
02:08:52 | FromDiscord | <Rika> The definition and the proc |
02:08:57 | FromDiscord | <Rika> You mightโve not exported it |
02:09:00 | FromDiscord | <ElegantBeef> ^ |
02:12:29 | FromDiscord | <tinygiant> sent a code paste, see https://play.nim-lang.org/#ix=2DmX |
02:12:58 | FromDiscord | <tinygiant> sent a code paste, see https://play.nim-lang.org/#ix=2DmY |
02:13:15 | FromDiscord | <ElegantBeef> Idk whats going on with your compiler |
02:13:34 | FromDiscord | <ElegantBeef> Is it just your editor complaining or your compiler? |
02:13:35 | FromDiscord | <ElegantBeef> https://play.nim-lang.org/#ix=2DmZ |
02:14:48 | FromDiscord | <tinygiant> Sometimes I really want to throw these little pooters in the trash. Turns out it was a lack of appropraite indentation about 100 lines below this issue. Fixed that and it recognized this. |
02:16:02 | FromDiscord | <ElegantBeef> lol |
02:16:16 | FromDiscord | <ElegantBeef> Turn on white space viewing in your editor |
02:17:05 | FromDiscord | <tinygiant> It wasn't really whitespace that was that issue, there was an `else:` that didn't have a statement associated with it (earlier delete), so I threw a `discard` in there and all is good. Learning every day, I guess. |
02:17:11 | FromDiscord | <ElegantBeef> Ah |
02:17:23 | FromDiscord | <Rika> Lol |
02:17:31 | FromDiscord | <ElegantBeef> Insert comment about how whitespace significance is hard to debug ๐ |
02:17:44 | FromDiscord | <Rika> Nim needs better indentation issue handling? |
02:17:50 | FromDiscord | <ElegantBeef> Probably |
02:18:59 | FromDiscord | <tinygiant> Goes back to this, though ...โต> Is it just your editor complaining or your compiler?โตIt was the editor/extension that was complaining about the undeclared identifier. Ran it through the compiler and it pointed at the problem `else:` statement immediately. |
02:19:20 | FromDiscord | <ElegantBeef> Ah |
02:19:43 | FromDiscord | <ElegantBeef> Tooling issues |
02:19:46 | FromDiscord | <tinygiant> That's the first time I'd seen that, so guess I have a new goto solution when stuff doesn't make sense. Or gotta look for a new extension. |
02:20:48 | FromDiscord | <ElegantBeef> What's your editor? |
02:21:11 | FromDiscord | <tinygiant> vscode with Zaitsev's nim extension. |
02:21:22 | FromDiscord | <ElegantBeef> Ah there arent more extensions ๐ |
02:21:26 | FromDiscord | <ElegantBeef> They're all the same |
02:22:04 | FromDiscord | <tinygiant> Ok, well, no worries, I'm used to stuff like that. I'll just be hitting up the compiler every time I have a head-scratcher instead banging my cranium against the nim extension. |
02:22:37 | FromDiscord | <ElegantBeef> Yea the nim extension can even sometimes give that identifier issue randomly for no logical reason and the compiler runs fine |
02:22:54 | FromDiscord | <tinygiant> Awesome. Well, thanks for you help ... Again. |
02:23:00 | FromDiscord | <ElegantBeef> No problem |
02:23:10 | FromDiscord | <ElegantBeef> Tooling sadly isnt perfect here ๐ |
02:23:26 | * | apahl quit (Ping timeout: 264 seconds) |
02:23:41 | FromDiscord | <tinygiant> Never is, but learned a little bit more about my environment's limitation and that can be just as good as learning more about the language. |
02:24:58 | * | apahl joined #nim |
02:37:49 | * | lbart joined #nim |
02:37:49 | * | lbart quit (Changing host) |
02:37:49 | * | lbart joined #nim |
02:42:08 | * | Tanger joined #nim |
03:01:03 | * | leorize quit (Ping timeout: 240 seconds) |
03:07:19 | disruptek | i don't like your attitude. |
03:07:20 | * | muffindrake quit (Ping timeout: 244 seconds) |
03:08:32 | * | leorize joined #nim |
03:09:44 | * | muffindrake joined #nim |
03:09:48 | FromDiscord | <Avatarfighter> ok |
03:11:45 | * | lbart quit (Ping timeout: 240 seconds) |
03:12:58 | FromDiscord | <Rika> Disruptek acting like a parrot again |
03:15:30 | * | lbart joined #nim |
03:15:30 | * | lbart quit (Changing host) |
03:15:30 | * | lbart joined #nim |
03:16:00 | FromDiscord | <Avatarfighter> lmaooo |
03:17:14 | disruptek | ic's rod file compression versus gzip... |
03:18:25 | disruptek | 27k -> 6k for snappy. |
03:20:18 | disruptek | 27k -> 3900b for gzip. |
03:20:49 | disruptek | i think i'm fine with that. |
03:20:53 | FromDiscord | <Rika> Well whatโs the speed of either |
03:21:09 | disruptek | pointless to measure. |
03:21:24 | FromDiscord | <Rika> Not needed? Okay |
03:21:48 | disruptek | https://en.wikipedia.org/wiki/Snappy_(compression) |
03:22:06 | leorize[m]1 | you tried zstd? |
03:22:19 | disruptek | do we have a native zstd now? |
03:22:22 | disruptek | !repo zstd |
03:22:24 | disbot | https://github.com/facebook/zstd -- 9zstd: 11Zstandard - Fast real-time compression algorithm 15 13075โญ 1228๐ด 7& 29 more... |
03:22:31 | disruptek | seems like no. |
03:22:51 | disruptek | i'm heavily biased towards solutions i can support. |
03:22:51 | * | a_chou quit (Quit: a_chou) |
03:22:57 | disruptek | weird, i know. |
03:22:58 | FromDiscord | <Avatarfighter> there is a zstd wrapper |
03:23:00 | FromDiscord | <Avatarfighter> Im using it |
03:23:21 | FromDiscord | <Avatarfighter> https://github.com/wltsmrz/nim_zstd |
03:23:27 | FromDiscord | <Rika> Well thatโs just a wrapper |
03:23:41 | FromDiscord | <Rika> Think he wants it in pure nim |
03:23:46 | FromDiscord | <Avatarfighter> oh |
03:24:04 | disruptek | i mean, we could maybe consider it, but... it's more important to have it run quickly. |
03:24:08 | FromDiscord | <Avatarfighter> When is github.com/disruptek/nimzstd coming out |
03:24:20 | leorize[m]1 | zstd is fast as hell |
03:25:31 | disruptek | speed looks fine but not the code. |
03:26:01 | FromDiscord | <nikki> for a construct that looks like `foo("required_str", blah=3, cool=4): some(); code();` -- where the idea is that the 'blah' and 'cool' can be many params that i just iterate over and codegen for -- do i need to use macros or can a template do that? |
03:26:26 | FromDiscord | <nikki> main q is i guess where you can just iterate over an arbitrary number of a=b pairs |
03:26:29 | leorize[m]1 | macros |
03:27:13 | FromDiscord | <nikki> aite guess i have some studying to do |
03:27:25 | disruptek | meh. |
03:27:35 | disruptek | i don't see us using zstd soon. |
03:27:39 | FromDiscord | <nikki> i could do `foo("required_str", { "oho": 42 }): code();` but that's lame |
03:27:45 | FromDiscord | <ElegantBeef> Macros are for any type of introspection templates are for code subsitution |
03:27:46 | disruptek | my entire storage backend is native nim and under 1000 lines. |
03:28:13 | FromDiscord | <nikki> right, i get that in the abstract but specifically if it's doable with templates i'd rather do it with templates bc. the implicit quasiquoting is nice |
03:28:15 | leorize[m]1 | @nikki I'd stick to whatever that's simpler but still do the job well |
03:28:29 | leorize[m]1 | only dabble in macros if you must tbh |
03:28:35 | FromDiscord | <nikki> hmm cool. do you think in this case that'd involve the `{ "mhm": "yes" }` versi5on |
03:28:47 | FromDiscord | <nikki> versus the `mhm="yes"` one |
03:28:53 | FromDiscord | <ElegantBeef> Psh always use macros it obfuscates code ๐ |
03:29:21 | FromDiscord | <Rika> If you donโt mind having the same type for every parameter yeah that works |
03:29:45 | FromDiscord | <nikki> ah woops, right |
03:29:50 | FromDiscord | <nikki> aite i guess gotta macroz it |
03:30:11 | FromDiscord | <ElegantBeef> Well i'm here to point you in the wrong directiong |
03:30:18 | disruptek | nice. |
03:30:37 | FromDiscord | <nikki> basically am making a generator for calls to http://google.github.io/incremental-dom/ to do a makeshift immediate mode ui api |
03:31:12 | FromDiscord | <nikki> should be pretty easy, the stateful push pop api they have is v. easy to wrap |
03:31:15 | leorize[m]1 | ah, then a dsl would be what you want then |
03:31:23 | leorize[m]1 | similar to karax i suppose |
03:32:04 | FromDiscord | <nikki> yeah since the api is kinda procedural, it turns out to be pretty simple. like i don't need to scan across an entire ui expression to build it |
03:32:09 | FromDiscord | <nikki> i can just keep making calls to the api |
03:32:22 | disruptek | you're blowin' my mind right now. |
03:32:41 | FromDiscord | <nikki> in a good way? or |
03:32:59 | FromDiscord | <nikki> like eg. having wrapped it in zig when i was evaluating zig. it came out to look like: https://gist.github.com/nikki93/c7cb0db98bea88b3a73c5978a29be006#file-ohai-zig-L137-L155 |
03:33:07 | FromDiscord | <nikki> which just only used procedure calls, no macros / dsl'ing |
03:33:48 | disruptek | no, i just had no idea there were so many of you. |
03:34:07 | FromDiscord | <nikki> i get that a lot |
03:35:00 | disruptek | i forgot how extensive frosty's debugging is. |
03:39:38 | disruptek | it's like i debugged the write() but assumed the read() would work perfectly. |
03:39:59 | disruptek | doesn't anyone test this garbage before they publish it? |
03:40:50 | disruptek | fieldPairs really chafes my ass, it must be said. |
03:41:31 | blueberrypie | If i want to interrupt a data transfer (ex if a http download is too big) would it be correct to call FutureStream[T].complete() in the middle of the transfer? https://nim-lang.org/docs/asyncstreams.html#complete%2CFutureStream%5BT%5D |
03:41:39 | blueberrypie | would that cancel the operation? |
04:06:01 | * | supakeen quit (Quit: WeeChat 2.9) |
04:06:32 | * | supakeen joined #nim |
04:30:57 | * | mmohammadi9812 quit (Quit: Quit) |
04:31:53 | * | mmohammadi9812 joined #nim |
04:53:34 | * | Tanger quit (Remote host closed the connection) |
05:07:04 | * | leorize quit (Ping timeout: 240 seconds) |
05:08:28 | * | leorize joined #nim |
05:13:23 | * | leorize quit (Ping timeout: 240 seconds) |
05:13:49 | * | leorize joined #nim |
06:04:08 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
06:47:43 | * | leorize quit (Ping timeout: 240 seconds) |
06:55:14 | * | leorize joined #nim |
06:56:26 | FromDiscord | <tinygiant> sent a long message, see http://ix.io/2DnD |
06:59:13 | FromDiscord | <ElegantBeef> @tinygiant do you mean aside from using hashsets to generate the removal/addition? |
07:00:08 | FromDiscord | <tinygiant> Not familiar with hashsets yet, but will be if I need to. Also, I think I remember something about being able to do unions/intersections/etc. with sequences. That might also be a possibility. |
07:01:22 | FromDiscord | <ElegantBeef> Hashsets are more efficient for that specific operation |
07:02:07 | FromDiscord | <ElegantBeef> Sets are garuenteed are O(1) lookups and dont have overlap, so it's relatively cheap to do intersections, unions, differences |
07:02:32 | FromDiscord | <tinygiant> Okay, is that all contained in the `sets` module? I'll start reading up on that. |
07:02:37 | FromDiscord | <ElegantBeef> yep |
07:02:50 | FromDiscord | <ElegantBeef> We do also do have bitsets, but those only work for ordinals so not useful here ๐ |
07:03:10 | FromDiscord | <ElegantBeef> Those are just defined `{10, 20, 30}` |
07:03:53 | FromDiscord | <tinygiant> Ok, thanks for the pointers. I'll read up on sets and see what I can come up with. |
07:04:20 | FromDiscord | <ElegantBeef> It's always funny seeing people use the exact words but not know it's a thing |
07:06:01 | FromDiscord | <ElegantBeef> So in the end all you have to do is have a proc of `removeKeys` which takes a jsonnode, and a `HashSet[String]`, that iterates over all the nodes and removes any that are not in the hashset |
07:06:05 | FromDiscord | <ElegantBeef> Atleast as i understand it |
07:08:50 | FromDiscord | <tinygiant> sent a code paste, see https://play.nim-lang.org/#ix=2CVs |
07:09:28 | FromDiscord | <ElegantBeef> Uncertain what you're asking |
07:11:59 | FromDiscord | <tinygiant> Just a Q about the KeyValuePairSeq[A]. I probably just need to experiment with it. The way my variables are currently setup, I'd only be working with seq[string] and keys, not key-value pairs, at least not until the finel iteration over the json node to delete. |
07:12:20 | FromDiscord | <ElegantBeef> hashsets keys are the value |
07:12:33 | FromDiscord | <ElegantBeef> you just do `set.incl("thisIsAKey")` |
07:12:42 | FromDiscord | <ElegantBeef> It's like a `Table[string,string]` |
07:12:55 | FromDiscord | <ElegantBeef> Not exactly, but similar |
07:13:22 | FromDiscord | <tinygiant> Okie doke. I'll throw some electrons at the screen and see what sticks. Thanks again, got some readin' to do. |
07:14:57 | * | solitudesf joined #nim |
07:15:09 | FromDiscord | <tinygiant> Another general question: can I use a hashset function to pull all the keys out of a json node, or do I need to iterate and create a seq from them? |
07:15:38 | FromDiscord | <ElegantBeef> well the function you define will iterate over it with the hashset |
07:16:08 | FromDiscord | <tinygiant> Sorry, I meant to help create the comparison set. One of the ingredients in the comparison set will be the keys from another jsonnode. |
07:16:25 | FromDiscord | <ElegantBeef> oh that i'd include all of the json nodes into the set |
07:16:45 | FromDiscord | <ElegantBeef> Get their key and `incl` it |
07:17:26 | FromDiscord | <tinygiant> Okay, got it. thanks. |
07:18:00 | * | narimiran joined #nim |
07:20:53 | * | habamax joined #nim |
07:22:23 | * | leorize quit (Ping timeout: 240 seconds) |
07:26:26 | * | leorize joined #nim |
07:41:43 | * | leorize quit (Ping timeout: 240 seconds) |
08:01:29 | * | Tanger joined #nim |
08:04:51 | * | natrys joined #nim |
08:10:12 | * | leorize joined #nim |
08:11:46 | FromDiscord | <tinygiant> sent a code paste, see https://play.nim-lang.org/#ix=2Do1 |
08:13:13 | FromDiscord | <ElegantBeef> What's it saying? |
08:13:19 | FromDiscord | <tinygiant> (edit) "https://play.nim-lang.org/#ix=2Do1" => "https://play.nim-lang.org/#ix=2Do2" |
08:13:35 | FromDiscord | <tinygiant> sent a code paste, see https://play.nim-lang.org/#ix=2Do3 |
08:14:12 | FromDiscord | <tinygiant> (edit) "https://play.nim-lang.org/#ix=2Do3" => "https://play.nim-lang.org/#ix=2Do5" |
08:14:19 | FromDiscord | <ElegantBeef> you dont give it the key |
08:14:38 | FromDiscord | <ElegantBeef> that turns into `delete(instanceNode[k], )` |
08:14:44 | FromDiscord | <ElegantBeef> which you can see why it errors |
08:15:32 | FromDiscord | <tinygiant> Ok, I see what it's doing with that notation. I was fooled by the `# Deletes obj[key].` comment in the function definition. Thanks for the clarification. |
08:36:24 | * | kwilczynski quit (Ping timeout: 240 seconds) |
08:37:03 | * | Adeon quit (Ping timeout: 260 seconds) |
08:37:14 | * | jholland__ quit (Ping timeout: 264 seconds) |
08:37:34 | * | hoek quit (Ping timeout: 244 seconds) |
08:37:38 | * | npgm_ quit (Ping timeout: 260 seconds) |
08:37:38 | * | surma quit (Ping timeout: 260 seconds) |
08:37:44 | * | rayman22201 quit (Ping timeout: 240 seconds) |
08:37:51 | * | zielmicha__ quit (Ping timeout: 264 seconds) |
08:37:55 | * | ormiret quit (Ping timeout: 240 seconds) |
08:38:04 | * | notchris quit (Ping timeout: 240 seconds) |
08:38:13 | * | r4vi quit (Ping timeout: 260 seconds) |
08:38:19 | * | fowl quit (Ping timeout: 272 seconds) |
08:38:24 | * | l1x quit (Ping timeout: 240 seconds) |
08:38:26 | * | sirn quit (Ping timeout: 264 seconds) |
08:38:32 | * | d10n-work quit (Ping timeout: 260 seconds) |
08:38:32 | * | nikita` quit (Ping timeout: 260 seconds) |
08:38:36 | * | stever quit (Ping timeout: 244 seconds) |
08:38:39 | * | hnOsmium0001 quit (Ping timeout: 246 seconds) |
08:38:48 | * | matlock quit (Ping timeout: 260 seconds) |
08:38:57 | * | nikki93 quit (Ping timeout: 268 seconds) |
08:39:07 | * | euantorano quit (Ping timeout: 260 seconds) |
08:49:08 | * | Vladar joined #nim |
08:52:13 | * | ormiret joined #nim |
08:52:22 | * | kwilczynski joined #nim |
08:52:28 | * | jholland__ joined #nim |
08:52:29 | * | matlock joined #nim |
08:52:34 | * | rayman22201 joined #nim |
08:52:45 | * | zielmicha__ joined #nim |
08:52:49 | * | sirn joined #nim |
08:52:50 | * | hoek joined #nim |
08:52:56 | * | l1x joined #nim |
08:52:58 | * | fowl joined #nim |
08:53:00 | * | Adeon joined #nim |
08:53:04 | * | r4vi joined #nim |
08:53:34 | * | notchris joined #nim |
08:53:41 | * | npgm_ joined #nim |
08:54:04 | * | Cthalupa quit (Ping timeout: 260 seconds) |
08:54:30 | * | surma joined #nim |
08:56:59 | * | Cthalupa joined #nim |
08:58:46 | * | hnOsmium0001 joined #nim |
09:00:46 | * | nikki93 joined #nim |
09:01:19 | * | euantorano joined #nim |
09:01:33 | * | stever joined #nim |
09:02:23 | * | nikita` joined #nim |
09:02:43 | * | d10n-work joined #nim |
09:11:53 | * | zielmicha__ quit (Ping timeout: 272 seconds) |
09:12:01 | * | zielmicha__ joined #nim |
09:12:02 | * | notchris quit (Ping timeout: 264 seconds) |
09:12:02 | * | jholland__ quit (Ping timeout: 264 seconds) |
09:14:12 | * | notchris joined #nim |
09:15:09 | * | jholland__ joined #nim |
09:15:23 | * | leorize quit (Ping timeout: 240 seconds) |
09:17:10 | * | leorize joined #nim |
09:56:23 | * | leorize quit (Ping timeout: 240 seconds) |
09:57:39 | * | leorize joined #nim |
09:59:05 | * | Tanger quit (Quit: Leaving) |
10:00:38 | * | hoek quit (Read error: Connection reset by peer) |
10:01:34 | * | hoek joined #nim |
10:06:30 | * | hnOsmium0001 quit (Quit: Connection closed for inactivity) |
10:08:58 | * | Vladar quit (Quit: Leaving) |
10:20:24 | * | mmohammadi9812 quit (Ping timeout: 272 seconds) |
10:20:51 | * | mmohammadi9812 joined #nim |
10:29:03 | * | opal quit (Ping timeout: 240 seconds) |
10:29:59 | * | bung joined #nim |
10:31:04 | * | opal joined #nim |
10:34:29 | bung | @pmunch I'v create a PR for making nimlsp more stable please check.https://github.com/PMunch/nimlsp/pull/60 |
10:34:30 | disbot | โฅ Clean |
11:03:54 | * | mmohammadi9812 quit (Ping timeout: 256 seconds) |
11:04:18 | * | mmohammadi9812 joined #nim |
11:08:00 | * | narimiran quit (Ping timeout: 260 seconds) |
11:12:56 | ForumUpdaterBot | New thread by HJarausch: Reference Variable (C++ jargon) - is there such a beast?, see https://forum.nim-lang.org/t/7051 |
11:15:35 | * | mmohammadi9812 quit (Ping timeout: 256 seconds) |
11:15:56 | * | pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
11:16:50 | * | mmohammadi9812 joined #nim |
11:17:19 | * | pbb joined #nim |
11:24:49 | * | Tanger joined #nim |
11:45:12 | * | lritter joined #nim |
11:50:45 | * | waleee-cl joined #nim |
11:55:48 | * | Cthalupa quit (Ping timeout: 256 seconds) |
11:57:21 | * | Cthalupa joined #nim |
12:03:22 | FromDiscord | <lqdev> why is there no floorMod for ints? i have to do shit like this to get a modulus that's correct below 0 `tilePosition.x.float32.floorMod(world.width.float32).int32` |
12:06:02 | * | supakeen quit (Quit: WeeChat 2.9) |
12:06:36 | * | supakeen joined #nim |
12:35:58 | * | xet7 quit (Quit: Leaving) |
12:43:30 | * | Vladar joined #nim |
12:49:10 | ForumUpdaterBot | New thread by HJarausch: Conditional expressions don't work in a formatted string, see https://forum.nim-lang.org/t/7052 |
13:18:24 | * | Sembei joined #nim |
13:23:09 | * | Cthalupa quit (Ping timeout: 256 seconds) |
13:24:38 | * | Cthalupa joined #nim |
13:35:43 | * | leorize quit (Ping timeout: 240 seconds) |
13:41:17 | FromGitter | <ynfle> How do I test if a flot is `NaN` |
13:41:55 | FromDiscord | <Rika> Lol I do something really stupid for that |
13:42:40 | FromDiscord | <Rika> `theFloat!=theFloat` |
13:43:36 | FromGitter | <ynfle> Is that safe and all? there is `dom.isNaN` but that needs a `BiggestFloat` |
13:44:13 | FromDiscord | <haxscramper> https://nim-lang.org/docs/math.html#classify,float |
13:45:02 | FromDiscord | <lqdev> yea that still uses x != x |
13:45:24 | FromDiscord | <lqdev> https://github.com/nim-lang/Nim/blob/version-1-4/lib/pure/math.nim#L156 |
13:45:41 | FromDiscord | <lqdev> i'd check the bits tho |
13:45:43 | FromDiscord | <lqdev> hold on |
13:46:36 | FromDiscord | <lqdev> a float is NaN if all exponent bits are set |
13:46:48 | FromDiscord | <lqdev> so you could just do a bitcast to an int64 or something |
13:47:15 | FromDiscord | <lqdev> and do a simple bitwise AND to check if all the exponent bits are set |
13:47:28 | FromGitter | <ynfle> Nah. I'm gonna stick with Rika suggestions. It seems like that is the way to go |
13:48:15 | FromDiscord | <Rika> Didnโt know my dumb solution is actually what is used |
13:49:09 | FromGitter | <ynfle> I saw it on StackOverflow so it must be right ๐ |
13:53:19 | * | leorize joined #nim |
14:01:04 | * | natrys quit (Ping timeout: 246 seconds) |
14:14:02 | * | natrys joined #nim |
14:35:01 | * | narimiran joined #nim |
14:35:42 | * | tane joined #nim |
14:37:03 | * | leorize quit (Ping timeout: 240 seconds) |
14:37:07 | * | natrys quit (Ping timeout: 246 seconds) |
14:37:27 | ForumUpdaterBot | New thread by HJarausch: Strange syntax - please explain, see https://forum.nim-lang.org/t/7053 |
14:38:24 | * | leorize joined #nim |
14:40:40 | FromDiscord | <exelotl> lol |
14:44:52 | * | NimBot joined #nim |
14:47:23 | * | leorize quit (Ping timeout: 240 seconds) |
14:51:35 | narimiran | HJarausch, king of inconsistent styles |
15:05:04 | * | leorize joined #nim |
15:21:39 | * | lum quit (Quit: Lum: Bye!) |
15:23:02 | * | lum joined #nim |
15:25:33 | FromGitter | <Lecale> Does anyone feel like playing spot why json module produces an exception here https://play.nim-lang.org/#ix=2Dqy |
15:43:59 | FromDiscord | <Rika> @Lecale the spaces in the line are not actual spaces |
15:44:03 | FromDiscord | <Rika> https://media.discordapp.net/attachments/371759389889003532/775022829056819230/Screenshot_20201109-004319.png |
15:44:54 | FromGitter | <Lecale> ah, a windows problem then |
15:48:00 | FromGitter | <Lecale> I have to first double check for \194 character before processing |
15:49:23 | * | leorize quit (Ping timeout: 240 seconds) |
15:49:39 | FromGitter | <Lecale> and \160 too, thanks Rika |
15:50:35 | * | leorize joined #nim |
16:02:18 | disruptek | even white boys have to shout, |
16:02:23 | disruptek | "baby got back" |
16:19:43 | * | leorize quit (Ping timeout: 240 seconds) |
16:20:43 | * | leorize joined #nim |
16:23:05 | * | sagax quit (Ping timeout: 240 seconds) |
16:23:46 | Zevv | funny how I still hate macros while I still love macros |
16:23:58 | disruptek | macros suck. |
16:24:09 | Zevv | I can now define my primitive functions for my Little Language in native nim without doing any interfacing |
16:24:31 | Zevv | the cost of which is again a repugnant macro in my code |
16:29:15 | disruptek | that sounds kinda badass. |
16:31:09 | disruptek | so frosty has a bug that only appears in refc. |
16:31:41 | Zevv | that's nice |
16:31:44 | Zevv | obsolete that shit, I say |
16:31:55 | disruptek | i can't; i need to fix it for ic. |
16:32:30 | disruptek | i might have ic working today, btw. |
16:32:36 | disruptek | well, the frontend cache anyway. |
16:35:48 | Zevv | bull |
16:37:00 | disruptek | the frontend is much easier. |
16:37:16 | disruptek | not even 2kloc. |
16:37:39 | disruptek | half that is the datastore. |
16:47:01 | Zevv | I say "hooray" for not needing sqlite |
16:49:43 | Zevv | that would have been malodorous |
16:50:30 | disruptek | it just didn't buy us anything but an extreme number of bugs. |
16:50:53 | disruptek | but araq says i need to "grow up" and write more buggy code. |
16:51:23 | disruptek | so, i dunno, my hot take on software quality is worthless, i guess. |
16:51:47 | Zevv | well, he doesn't care anyways, right |
16:52:04 | Zevv | and is that "(more buggy) code" or "more (buggy code)" |
16:52:15 | Zevv | because writing more code is not feasibly, in your current condition I feel. |
16:52:23 | Zevv | like, the condition where you are writing code 10 hours a day already |
16:53:02 | disruptek | well, i write a lot of toy code that i throw away. |
16:53:23 | Zevv | but, is it buggy?! |
16:53:32 | disruptek | i don't really write that much production stuff unless i'm really trying to complete a project. |
16:53:39 | Zevv | I hear you |
16:53:52 | disruptek | his statement was "software should be *soft*"; mutable. |
16:54:08 | Zevv | yeah. but not broken by design |
16:54:09 | Zevv | either |
16:54:10 | disruptek | i agree with that. but i like my software to move from strength to strength. |
16:54:33 | disruptek | i like it to be correct, and when it changes, i like it to be no less correct than it was. |
16:54:38 | Zevv | I have the same. There's a very clear line between toy code and proper code |
16:54:54 | disruptek | i just feel that being able to depend upon software is where you draw strength. |
16:54:58 | Zevv | 98% never leaves category #1. but once it does, I tend to take that seriously |
16:55:18 | disruptek | if i cannot depend on the code, it's basically worthless to me. it cannot be a part of many future abstractions. |
16:55:24 | Zevv | so right |
16:55:43 | Zevv | and there you have one of the reasons I do not like to depend on 3d party stuff |
16:56:07 | Zevv | often it is very unclear what the authors intentions are, in terms of seriousness, stability |
16:56:11 | disruptek | your npeg fix is making me bump like a dozen projects of mine. |
16:56:17 | Zevv | what fix |
16:56:28 | disruptek | > 0 -> > 1 |
16:56:33 | disruptek | 0.23.2 |
16:56:57 | disruptek | and i'm putting the reqs in at < 1.0.0, so you had better take semver to heart. |
16:57:10 | Zevv | yes, I do, I do |
16:57:15 | disruptek | i think so, too. |
16:57:22 | Zevv | this was a minor, but it added a check for a stupid mistake I kept making myself |
16:57:29 | Zevv | (this | that, such | so) |
16:57:35 | disruptek | good, good. |
16:57:40 | Zevv | that parsed, but threw away the "such | so" |
16:58:48 | Zevv | would you look at all those nice little primitives. I can just defined them like that and then call them from my stuff |
16:59:05 | disruptek | abstraction, it's fucking glorious. |
16:59:25 | disruptek | i got into programming because i wanted to cheat. |
16:59:36 | disruptek | so all my code is, like, designed to be unbreakable. |
17:00:18 | disruptek | araq's approach is to make a thing that works and let the community feedback drive future development. i really don't like that. |
17:01:03 | disruptek | i don't want to have to trust myself, let alone other users. |
17:02:09 | disruptek | let's face it; i'm not trustworthy. |
17:07:23 | * | xet7 joined #nim |
17:14:25 | * | mmohammadi9812 quit (Read error: Connection reset by peer) |
17:14:37 | * | mmohammadi9812 joined #nim |
17:15:21 | FromDiscord | <Avatarfighter> Hello hello everyone |
17:15:46 | disruptek | sup dawg. |
17:16:02 | FromDiscord | <Avatarfighter> Whatchu working on |
17:16:06 | FromDiscord | <nikki> ๐ |
17:16:40 | FromDiscord | <haxscramper> Is it possible to print absolutely all macro expansions? I just want to count the number of macro-generated code lines |
17:17:39 | disruptek | you might be able to use expandMacros from the cli to do this. |
17:17:46 | * | go|dfish quit (Ping timeout: 246 seconds) |
17:18:13 | disruptek | i'm working on trying to figure out why frosty doesn't pass refc tests for me locally. |
17:18:46 | FromDiscord | <haxscramper> It only works for single macro, and in my case it simply doesn't work at all for some reason |
17:18:57 | disruptek | hack it to work for all macros. |
17:28:42 | FromDiscord | <Avatarfighter> disruptek: is frosty not passing your tests new? |
17:43:04 | * | Kaivo quit (Quit: WeeChat 2.9) |
17:45:24 | * | ryuzak1[m] joined #nim |
17:45:28 | disruptek | it works in ci but i just noticed that something is broken locally. not sure what's up. |
17:47:01 | Zevv | so this ci of yours |
17:47:07 | Zevv | when is it "done" |
17:47:36 | disruptek | ci or ic? |
17:47:50 | Zevv | ic of course,dont be pedantic |
17:48:04 | Zevv | does it do nim itself, and all the tests? |
17:48:23 | disruptek | the frontend cache is easy. the backend cache... i guess i have to wait for araq to come to jesus on it. |
17:49:25 | FromDiscord | <Kiloneie> Where is the full size of this emoji :nimAngry: ? |
17:51:12 | FromDiscord | <Kiloneie> I am sketching myself an intro animation(im terrible at art) and i like that icon |
17:51:28 | Zevv | disruptek: some mess you worked yourself into |
17:51:52 | disruptek | i learned some lessons, to be sure. |
17:56:18 | FromDiscord | <Avatarfighter> @Kiloneie https://media.discordapp.net/attachments/371759389889003532/775056111798583356/bitmap.png |
17:56:27 | FromDiscord | <Avatarfighter> @ElegantBeef should have the svg for this |
17:56:29 | FromDiscord | <Avatarfighter> I think |
18:00:29 | Zevv | lessons like "keep to your own business" |
18:00:35 | FromDiscord | <Kiloneie> that would be great, i think i might modify it some, but i want this in the center, trying to make like door opening with this in the middle |
18:01:10 | FromDiscord | <Kiloneie> gonna have to put credits to you in the videos xD |
18:01:23 | disruptek | lessons like, "is rust really /that/ bad?" |
18:01:35 | FromDiscord | <Avatarfighter> disruptek: yes because its not nim |
18:03:08 | FromDiscord | <Kiloneie> uff, 3900x is 505โฌ on my default size i look for computers and 5900x is 737โฌ(3900x is as low as 450โฌ in other stores)... damn... might be forced to go 3900x if i will need more processing power in the months to come |
18:03:45 | FromDiscord | <Kiloneie> and 3950x is 807โฌ... better value than 5900x if you need production power |
18:03:59 | FromDiscord | <lqdev> isn't that a bit #offtopic ? |
18:04:12 | FromDiscord | <Kiloneie> god damn wrong channel |
18:04:14 | FromDiscord | <Kiloneie> xD |
18:04:18 | FromDiscord | <lqdev> lol |
18:04:24 | FromDiscord | <Kiloneie> i didn't check |
18:05:07 | Zevv | disruptek: what does rust have to do with this then? |
18:05:31 | FromDiscord | <Avatarfighter> Zevv: probably nothing |
18:05:50 | disruptek | you never want to learn how they make the sausage. |
18:07:58 | * | Vladar quit (Quit: Leaving) |
18:25:22 | * | hnOsmium0001 joined #nim |
18:25:25 | * | mmohammadi9812 quit (Quit: Quit) |
18:34:30 | * | disruptek sighs. |
18:35:00 | disruptek | the object variant case changes are now hard errors outside of danger/release. |
18:36:16 | FromDiscord | <Avatarfighter> what changes? |
18:36:38 | disruptek | "assignment to discriminant changes object branch; compile with -d:nimOldCaseObjects for a transition period" |
18:36:48 | FromDiscord | <Avatarfighter> this is so sad |
18:39:15 | disruptek | we'll get through it together. |
18:40:27 | FromDiscord | <ache of head> wholesome disruptek moment |
18:40:28 | FromDiscord | <ache of head> rare |
18:44:47 | disruptek | it really makes you think. |
18:46:48 | * | Vladar joined #nim |
18:48:04 | Zevv | what was this new thing to do a copy-before-in-place-operations on a thing |
18:49:33 | disruptek | dup? |
18:49:55 | Zevv | yah |
18:50:09 | Zevv | pff that syntax is funny |
18:50:22 | Zevv | `a.dup(sort)` |
18:50:27 | Zevv | Why not `a.dup.sort()` |
18:51:45 | disruptek | dunno. i didn't take an interest in with/collect/dup/etc. because i figured i could never use them in nim-1.0 code. |
18:52:19 | Zevv | fair enough |
18:53:37 | * | mmohammadi9812 joined #nim |
18:58:32 | * | suchasurge9 joined #nim |
18:59:02 | * | suchasurge quit (Read error: Connection reset by peer) |
18:59:02 | * | suchasurge9 is now known as suchasurge |
18:59:43 | * | opal quit (Ping timeout: 240 seconds) |
19:01:23 | * | opal joined #nim |
19:03:33 | FromDiscord | <lqdev> Zevv: you know you can do this |
19:03:40 | FromDiscord | <lqdev> sent a code paste, see https://play.nim-lang.org/#ix=2Ds1 |
19:04:01 | FromDiscord | <lqdev> `a.dup.sort()` can't really be handled by macros |
19:04:37 | Zevv | no I see why it is. I'm just complaining about the resulting syntax looking silly. |
19:05:13 | FromDiscord | <lqdev> command call syntax is your friend: `a.dup sort()` |
19:05:25 | Zevv | yes but no but yes but |
19:05:36 | FromDiscord | <lqdev> yes |
19:05:45 | Zevv | naively, one would expect `dup()` to be magic proc cloning whatever you feed it |
19:06:03 | Zevv | but now it's turned inside-out |
19:06:09 | disruptek | it's pretty fucked up, you have to admit. |
19:06:23 | Zevv | well, it lives in sugar for a reason right |
19:06:28 | Zevv | too much is bad for you |
19:11:52 | * | dom96 quit (Ping timeout: 246 seconds) |
19:12:09 | disruptek | it's one of those expensive zero-cost abstractions. |
19:13:38 | * | dom96 joined #nim |
19:13:38 | * | dom96 quit (Changing host) |
19:13:38 | * | dom96 joined #nim |
19:27:23 | FromDiscord | <nikki> for loops is all you need! |
19:27:33 | * | theelous3 joined #nim |
19:53:42 | * | Zoom[m] joined #nim |
19:56:14 | Zevv | zerofunctional |
19:57:01 | disruptek | dysfunctional, they call me. loopy, too. |
20:04:39 | FromDiscord | <lqdev> gosh |
20:04:44 | FromDiscord | <lqdev> why is there no `min` for uint32 |
20:07:07 | FromDiscord | <nikki> whatcha using uint32 for |
20:07:20 | FromDiscord | <lqdev> efficiency. |
20:09:39 | FromDiscord | <nikki> is there min for int32 |
20:10:33 | FromDiscord | <lqdev> yes |
20:10:53 | FromDiscord | <nikki> why not use int32 ๐ฎ |
20:11:29 | FromDiscord | <lqdev> i'm using uint32 to represent item quantities |
20:11:35 | FromDiscord | <lqdev> you can't have -2 items |
20:11:47 | narimiran | `Natural`? |
20:11:52 | FromDiscord | <nikki> sure but the difference of two item quantities can be negative |
20:12:00 | FromDiscord | <lqdev> but you sure can have 4294967295 |
20:12:05 | FromDiscord | <lqdev> and? |
20:12:08 | FromDiscord | <nikki> usually using unsigned for quantities seems off-base |
20:12:24 | FromDiscord | <nikki> to me it's made more sense for just representing bits |
20:12:34 | narimiran | https://nim-lang.github.io/Nim/system.html#Natural |
20:12:35 | FromDiscord | <lqdev> why? |
20:12:46 | FromDiscord | <nikki> another example is you can't iterate downto 0 by comparing >= 0 |
20:12:47 | FromDiscord | <lqdev> i don't need to calculate the difference between two quantities anywhere? |
20:12:49 | FromDiscord | <lqdev> (edit) "anywhere?" => "anywhere" |
20:13:18 | FromDiscord | <lqdev> i'll try with Natural i guess |
20:13:48 | FromDiscord | <nikki> did you want the 32 bit for perf as u said |
20:14:40 | FromDiscord | <nikki> but yeah a lot of stuff like generic code that assumes that a - b < 0 <=> a < b breaks when unsigneds come in |
20:14:52 | FromDiscord | <nikki> and i can see how having min but having that break could break some concepts |
20:19:13 | FromDiscord | <lqdev> what baffles me is the lack of floorMod for ints. like yeah, i get it, `floor(myInt)` doesn't make sense, but `mod` is broken when you use it with negative integers so you have to dance around it like `tilePosition.x.float32.floorMod(world.width.float32).int32` |
20:19:21 | FromDiscord | <lqdev> that's an actual bit of code from my game. |
20:19:34 | FromDiscord | <lqdev> afact there is no other way of achieving the same result. |
20:19:38 | disruptek | sounds like a lot of fun to me. |
20:19:39 | FromDiscord | <lqdev> (edit) "afact" => "afaict" |
20:19:43 | * | leorize quit (Ping timeout: 240 seconds) |
20:20:14 | FromDiscord | <nikki> huh i see. you're going for the usual mod is just distance from the highest multiple lower than the value right? |
20:20:18 | disruptek | but seriously, i agree. it's just hard fixing this stuff -- too many people who want to leave it the way it is. |
20:20:49 | FromDiscord | <lqdev> @nikki wdym |
20:21:00 | disruptek | i think it's likely that status has this stuff audited and cannot afford the breakage. |
20:21:09 | FromDiscord | <lqdev> disruptek: but there is no `floorMod` for ints at all, why not just add it to stdlib? |
20:21:43 | disruptek | it's not that; it's the whole unsigned problem itself. |
20:22:08 | * | leorize joined #nim |
20:22:46 | FromDiscord | <lqdev> @nikki the default `mod` breaks my tilemaps at negative coordinates because `-1 mod 8` is 0 and not -1 |
20:22:54 | FromDiscord | <nikki> @lqdev just meant the standard mod behavior in eg. C -- a mod b is just distance of a from the left multiple of b on the number line |
20:23:10 | FromDiscord | <lqdev> yeah, probably |
20:23:25 | FromDiscord | <nikki> -1 mod 8 is 1 right? |
20:23:32 | * | sschwarzer joined #nim |
20:23:34 | FromDiscord | <nikki> wait no, 7 |
20:23:38 | FromDiscord | <nikki> or something, idk lol |
20:23:45 | FromDiscord | <nikki> i guess -1 also works |
20:24:09 | FromDiscord | <nikki> how is it ever 0 lol wow |
20:24:12 | FromDiscord | <lqdev> or was it `div` that returned -1? either one returns the wrong thing and i have to do that weird dance from above |
20:24:20 | FromDiscord | <lqdev> :s/-1/0 |
20:24:45 | FromDiscord | <lqdev> !eval import math; echo (-1 mod 8, floorMod(-1, 8)) |
20:24:48 | NimBot | (-1, 7) |
20:24:51 | FromDiscord | <nikki> yeah that'll getcha in classic grid math |
20:24:57 | FromDiscord | <nikki> mod just works for grids |
20:25:02 | FromDiscord | <nikki> unless it's not mod |
20:25:02 | FromDiscord | <lqdev> yeah i told you it's -1 |
20:25:26 | FromDiscord | <nikki> right yeah, the 7 was what i'd've expected |
20:25:35 | FromDiscord | <nikki> distance of -1 from -8 |
20:25:59 | sschwarzer | I'd like to convert a template argument to a string, as in https://play.nim-lang.org/#ix=2DsC . Is this possible? |
20:26:17 | FromDiscord | <lqdev> sschwarzer: use astToStr |
20:26:34 | FromDiscord | <nikki> and probs needs to be a macro not a template right |
20:26:38 | FromDiscord | <lqdev> no |
20:26:42 | FromDiscord | <nikki> kj |
20:26:43 | FromDiscord | <lqdev> it works with templates too |
20:26:46 | FromDiscord | <nikki> (edit) "kj" => "kk" |
20:26:56 | sschwarzer | lqdve: will try, thanks :) |
20:27:06 | FromDiscord | <lqdev> @nikki anyways still, that doesn't explain that i have to dance around my mod issue with so many type conversions |
20:27:11 | FromDiscord | <lqdev> it's not readable. it's madness. |
20:27:19 | FromDiscord | <nikki> yeah for sure |
20:27:29 | FromDiscord | <krisppurg> sent a code paste, see https://play.nim-lang.org/#ix=2DsE |
20:27:35 | FromDiscord | <nikki> maybe just make a distinct type lol with all ops doing what u want |
20:27:42 | sschwarzer | lqdev: works! :-) |
20:27:53 | FromDiscord | <lqdev> guess i can just add `floorMod(int, int)` to rapid/math/util lol |
20:28:23 | FromDiscord | <nikki> yea an engine ends up accumulating math utils regardless |
20:28:41 | FromDiscord | <nikki> could just go with the other scalar ops |
20:28:42 | * | mmohammadi9812 quit (Remote host closed the connection) |
20:30:53 | FromDiscord | <Avatarfighter> disruptek: https://github.com/guzba/zippy/tree/master/examples |
20:30:58 | FromDiscord | <Avatarfighter> zlib |
20:31:08 | disruptek | so what? |
20:31:13 | * | mmohammadi9812 joined #nim |
20:31:27 | FromDiscord | <Avatarfighter> you wanted a pure nim implementation the other day |
20:31:43 | disruptek | not for zlib. |
20:32:12 | FromDiscord | <lqdev> oh wait hold on |
20:32:16 | FromDiscord | <lqdev> it's just glm messing with me |
20:32:21 | FromDiscord | <lqdev> i don't need to do this dance at all |
20:32:36 | FromDiscord | <lqdev> `floorMod` is defined for SomeNumber in math |
20:32:47 | FromDiscord | <Avatarfighter> oh i forgot |
20:32:47 | FromDiscord | <lqdev> but glm only has it for Vec2f and Vec2d |
20:32:52 | FromDiscord | <Avatarfighter> i mixed up zstandard and zlib |
20:33:14 | disruptek | it's alright, chucklehead. |
20:33:46 | FromDiscord | <guzba> hmm maybe ill have to learn about zstandard sometime |
20:33:52 | FromDiscord | <guzba> i did snappy already too |
20:34:12 | disruptek | yeah, we're using it in the compiler. |
20:34:19 | disruptek | good stuff. thank you. |
20:34:31 | FromDiscord | <Avatarfighter> well whatever ill still use it |
20:35:02 | FromDiscord | <guzba> i hope ppl do, imo gzip etc is critical and having a real impl in the language itself saves a ton of pain |
20:35:25 | disruptek | truly. it's something araq asked me to work on, also. |
20:36:06 | FromDiscord | <guzba> i work with treeform a lot and he said it would be a good thing for nim so i went for it |
20:36:56 | disruptek | stdlib http needs to support compressed bodies, is the main thing. |
20:39:11 | FromDiscord | <guzba> yeah handling gzip transparently would be great |
20:39:22 | * | habamax quit (Ping timeout: 246 seconds) |
20:42:41 | FromDiscord | <nikki> @lqdev re: "using uint32" for perf -- was it because storing smaller size (32 bits) fits more stuff in cache or bc. unsigned ops are more performant or ...? |
20:43:03 | * | leorize quit (Ping timeout: 240 seconds) |
20:43:04 | FromDiscord | <lqdev> in retrospect it was kinda dumb actually |
20:43:22 | FromDiscord | <lqdev> i don't use this field that often anyways |
20:43:23 | FromDiscord | <nikki> i do really think it makes sense to stick with int, unless actually need some bit stuff |
20:48:57 | * | sschwarzer quit (Quit: leaving) |
20:49:49 | * | tane quit (Quit: Leaving) |
20:51:01 | FromDiscord | <krisppurg> hey @haxscramper from yesterday I've did your chunkStream proc and for some reason the outputStream is empty. |
20:53:18 | FromDiscord | <krisppurg> hold on lemme give you the code |
20:53:43 | FromDiscord | <haxscramper> If `ffmpeg` writes data to stdout it should not be empty. E.g. there is no other way for getting output data from process |
20:53:47 | FromDiscord | <krisppurg> sent a code paste, see https://play.nim-lang.org/#ix=2DsZ |
20:56:19 | FromDiscord | <haxscramper> You `readAll` and then try to read more from stream. Of course it would be empty, what else? |
20:56:46 | FromDiscord | <krisppurg> I mean I've tried setPosition |
20:57:04 | FromDiscord | <haxscramper> It should not work for files/io streams |
20:57:15 | FromDiscord | <haxscramper> should not == raises exception |
20:58:36 | ForumUpdaterBot | New thread by Guzba: Zippy: a dependency-free Nim implementation of deflate, gzip, zlib, zip, see https://forum.nim-lang.org/t/7054 |
20:58:50 | FromDiscord | <Avatarfighter> i recognize this library ๐ค |
20:58:52 | FromDiscord | <guzba> spam all the places |
20:58:53 | FromDiscord | <guzba> ๐ |
20:59:52 | * | kinkinkijkin joined #nim |
20:59:55 | * | leorize joined #nim |
21:02:30 | * | xet7 quit (Remote host closed the connection) |
21:02:40 | FromDiscord | <krisppurg> So, I've also tried readDataStr and still nothing |
21:06:25 | FromDiscord | <haxscramper> @krisppurg without `readAll` ? |
21:06:34 | FromDiscord | <krisppurg> yed |
21:06:37 | FromDiscord | <krisppurg> (edit) "yed" => "yes" |
21:08:21 | Prestige | @treeform I'm looking at the fidget examples, and it seems like the text shifts up when editing https://i.imgur.com/DiUSli8.png is this a known bug? |
21:10:47 | * | aethylia joined #nim |
21:11:09 | FromDiscord | <haxscramper> @krisppurg I don't know what could be causing this - yesterday's code worked just fine, the one you just pasted works too - if you remove `readAll` - (https://play.nim-lang.org/#ix=2Dt4 ) so my guess that it is either some funny things with how `ffmpeg` writes data (unlikely but possible) or something else that I don't know of. |
21:11:33 | FromDiscord | <krisppurg> hax do you have ffmpeg installed? |
21:11:39 | FromDiscord | <haxscramper> yes |
21:11:53 | FromDiscord | <krisppurg> I'll give you the command |
21:12:23 | FromDiscord | <krisppurg> `ffmpeg -i ./AUDIOFILE -ac 2 -ar 48k -f s16le -acodec libopus -loglevel quiet pipe:1` |
21:12:30 | FromDiscord | <krisppurg> (edit) removed "" |
21:13:38 | * | solitudesf quit (Ping timeout: 256 seconds) |
21:15:27 | * | abm joined #nim |
21:16:11 | aethylia | hey everyone. Is there a way to use asyncnet.recvInto with a dynamic buffer? I've tried with a sequence but get Illegal storage access |
21:16:36 | FromDiscord | <lqdev> how are you calling recvInto? |
21:16:42 | FromDiscord | <haxscramper> @krisppurg https://play.nim-lang.org/#ix=2Dt6 - works just fine |
21:16:57 | FromDiscord | <krisppurg> wtf |
21:17:00 | FromDiscord | <haxscramper> `aa.mp3` is just some random junk I had laying around, but otherwise no issues |
21:17:24 | aethylia | trying to use it with an AsyncSocket |
21:17:47 | FromDiscord | <lqdev> aethylia: i don't care what you're trying to use it with, show me the call to recvInto. |
21:18:03 | FromDiscord | <lqdev> i have a hunch you're trying to do `addr yourSeq`, which is incorrect |
21:18:08 | aethylia | var payloadBytes = newSeq[uint8](payloadLen) discard await client.recvInto(addr payloadBytes, payloadLen) |
21:18:16 | FromDiscord | <lqdev> yeah. |
21:18:22 | FromDiscord | <lqdev> you need to do `addr payloadBytes[0]` |
21:18:28 | aethylia | ahh |
21:18:32 | aethylia | thank you very much |
21:18:37 | FromDiscord | <lqdev> because the seq has a header at the beginning |
21:19:01 | aethylia | awesome I thought that was why it wasn't working but didn't know the fix |
21:19:09 | aethylia | appreciate the quick response, thanks aain |
21:19:12 | FromDiscord | <lqdev> so if you're passing `addr payloadBytes` you're overwriting that header and messing something up |
21:20:03 | FromDiscord | <lqdev> you wanna get a pointer to the first element, not the header, so you use `addr yourSeq[0]` |
21:20:10 | * | narimiran quit (Quit: leaving) |
21:21:43 | aethylia | Makes sense, that's done the job |
21:23:00 | Prestige | Doesn't nimble doc only generate for one file? I there a way to do this for all files in a nimble package? |
21:23:57 | disruptek | nim doc --project --outdir=docs |
21:24:02 | FromDiscord | <lqdev> Prestige: https://nim-lang.org/docs/docgen.html#introduction-quick-start |
21:24:22 | Prestige | oh I didn't know about nim doc, cool. Thakns |
21:24:42 | FromDiscord | <lqdev> i think nimble doc just passes the args to nim doc anyways |
21:26:28 | Zoom[m] | Hi everyone. Trying to use Nim as my go-to for simple scripts. ATM rying to process a list of strings with an external process. How can I add some parallel execution for this? https://play.nim-lang.org/#ix=2Dt8 |
21:26:35 | FromDiscord | <krisppurg> sent a code paste, see https://play.nim-lang.org/#ix=2Dt9 |
21:26:43 | FromDiscord | <krisppurg> sorry for the slight flood guys |
21:26:45 | Zoom[m] | In Rust i'd slap some Rayone magic on it easily |
21:27:45 | Zoom[m] | But can't get my head around {.experimental: "parallel".} or Weave here |
21:27:55 | FromDiscord | <krisppurg> @haxscramper incase if you aren't around |
21:28:21 | FromDiscord | <haxscramper> I'm around for next ~30 seconds and then going to sleep |
21:28:30 | FromDiscord | <krisppurg> oof |
21:30:01 | FromDiscord | <krisppurg> lemme post the error I got |
21:30:24 | FromDiscord | <haxscramper> Link whole code too - I will look at it later |
21:31:02 | FromDiscord | <krisppurg> alright then |
21:31:04 | FromDiscord | <krisppurg> https://play.nim-lang.org/#ix=2Dtb |
21:31:38 | FromDiscord | <krisppurg> full code https://play.nim-lang.org/#ix=2Dtc |
21:31:46 | FromDiscord | <krisppurg> inb4 leaks |
21:32:36 | FromDiscord | <haxscramper> Just to clarify - I know little to nothing about async/etc so judging from the error I would be of lite help here regardless |
21:33:11 | FromDiscord | <krisppurg> I know exactly where would the error come from and why |
21:33:40 | FromDiscord | <krisppurg> (edit) "I know exactly where would the error come from and why ... " added "it comes from there" |
21:53:44 | * | Vladar quit (Quit: Leaving) |
21:55:52 | * | lritter quit (Quit: Leaving) |
22:00:46 | FromDiscord | <treeform> @Prestige Yeah its a bug I also have. I am doing some big changes in my fidget/mirror branch. Hopefully it will fix this issue too. |
22:01:15 | Prestige | Cool, thanks! |
22:11:26 | * | Jjp137 quit (Ping timeout: 264 seconds) |
22:11:44 | FromDiscord | <treeform> I think if you change it to vTop, hLeft it will work normally. |
22:19:39 | * | Jesin quit (Quit: Leaving) |
22:25:18 | * | aethylia quit (Remote host closed the connection) |
22:31:03 | * | a_chou joined #nim |
22:35:57 | * | lotuseater joined #nim |
22:38:02 | FromDiscord | <Daniel> cant wait for for fidget tutorial, for total noobs |
22:47:38 | * | Jesin joined #nim |
23:09:30 | * | vesper11 joined #nim |
23:09:34 | * | vesper quit (Ping timeout: 265 seconds) |
23:23:30 | * | lotuseater quit (Remote host closed the connection) |
23:29:13 | FromGitter | <gogolxdong> Does https://github.com/facebook/zstd work for video? |
23:41:14 | Zoom[m] | gogolxdong, it's a general purpose compressor and they usually work poorly on media. If it's already compressed with any lossy codec such as h264 it won't do any good. |
23:49:36 | FromDiscord | <Daniel> Indeed, video is already compressed data |
23:49:46 | disruptek | you're blowin' my mind right now. |
23:50:15 | FromDiscord | <Daniel> like inception |
23:50:24 | FromDiscord | <Daniel> compression within compression ๐ |
23:59:55 | * | a_chou quit (Ping timeout: 246 seconds) |