00:10:17 | FromDiscord | <codic> In nim, how would I write something like this c? `int test = *t;` |
00:10:31 | FromDiscord | <codic> Wait no |
00:10:40 | FromDiscord | <codic> i meant `int *t;` |
00:14:05 | FromGitter | <bung87> `ptr int` |
00:14:13 | FromDiscord | <codic> Where's the `t` in that |
00:14:35 | FromDiscord | <codic> Would it be `ptr int t`? |
00:15:42 | FromDiscord | <codic> or `ptr t int`? |
00:15:45 | FromDiscord | <codic> or `ptr t:int`? |
00:15:54 | FromGitter | <bung87> var a:ptr int = t |
00:16:12 | FromDiscord | <codic> oh thank you! |
00:16:48 | FromDiscord | <codic> So `var var1:ptr char = t` would be `char *t`? |
00:17:14 | FromDiscord | <codic> Fail |
00:17:17 | FromDiscord | <codic> Undeclared identifier |
00:17:58 | FromDiscord | <exelotl> `var var1:ptr char = t` would be equivalent to `char *var1 = t` |
00:18:45 | FromDiscord | <exelotl> however, what are you planning to use var1 for in this case? |
00:19:07 | FromGitter | <bung87> @codic you comming from c? |
00:19:41 | FromDiscord | <codic> i am not, just trying to make a friend that loves c to use vim |
00:20:09 | FromDiscord | <codic> I'm taking this https://www.tutorialspoint.com/cprogramming/c_pointers.htm |
00:21:45 | FromGitter | <bung87> you may need clearify your question , it's about type declaration or assignment? |
00:22:05 | FromDiscord | <codic> not sure what ya mean, I don't know c, haha |
00:22:18 | FromDiscord | <codic> I'm just trying to find the direct equivalent of `type *something` |
00:23:21 | FromGitter | <bung87> then it is `ptr type` |
00:23:36 | * | ptdel quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
00:24:31 | FromDiscord | <codic> but where is the `something` |
00:24:34 | FromDiscord | <codic> that's what I don't get |
00:25:00 | FromDiscord | <codic> for example |
00:25:02 | FromDiscord | <codic> let's take this |
00:25:02 | FromDiscord | <codic> https://hastebin.com/wamayeporu.cs |
00:25:12 | FromDiscord | <codic> I want to do something like that in nim |
00:25:23 | FromDiscord | <codic> I get that &var is addr var |
00:25:27 | FromDiscord | <codic> but I don't get what char *var is |
00:26:00 | FromDiscord | <codic> yes the quotes are wrong lol |
00:26:07 | FromGitter | <bung87> `char *var` it's combine the type and variable declaration |
00:26:17 | FromDiscord | <exelotl> well first off you don't want to name a var "var" in nim |
00:26:24 | FromGitter | <dawkot> https://i.imgur.com/afr6frt.png |
00:26:29 | FromDiscord | <Rika> ```var `var`: ptr char```? |
00:26:31 | FromGitter | <dawkot> What did they mean by this |
00:26:40 | FromDiscord | <exelotl> (unless you do what rika did) |
00:26:55 | FromDiscord | <Rika> dawkot: theyre planning to target nim? |
00:27:09 | FromDiscord | <codic> Wait, so `var thing: ptr char` == `char *thing`? |
00:27:12 | FromGitter | <dawkot> That's what it says |
00:27:17 | FromDiscord | <Rika> codic, yes |
00:27:31 | FromDiscord | <codic> great |
00:27:31 | FromDiscord | <Rika> dawkot: i dont seem to understand what you dont understand |
00:28:12 | FromGitter | <dawkot> I'm just surprised |
00:28:22 | FromDiscord | <codic> Nooooooo |
00:28:43 | FromDiscord | <codic> "template/generic instantiation of `&` from here" |
00:28:46 | FromDiscord | <codic> for `echo &"The address of the variable var1 is {var1.addr}" |
00:28:47 | FromDiscord | <codic> ` |
00:29:03 | FromDiscord | <Rika> import strformat |
00:29:15 | FromDiscord | <Rika> oh |
00:29:16 | FromDiscord | <codic> i did |
00:29:19 | FromDiscord | <Rika> oh |
00:29:21 | FromGitter | <dawkot> I think you need to cast var1.addr to int |
00:29:28 | FromDiscord | <Elegant Beef> isnt `&""` short form of `fmt""`? |
00:29:29 | FromDiscord | <codic> ah |
00:29:32 | FromDiscord | <Elegant Beef> is * |
00:29:34 | FromDiscord | <Rika> @Elegant Beef not exactly |
00:29:35 | FromDiscord | <codic> @Elegant Beef It isn't a raw string |
00:29:39 | FromDiscord | <KingDarBoja> Not exactly |
00:29:42 | FromDiscord | <codic> fmt is a raw string, & isn't |
00:29:46 | FromDiscord | <KingDarBoja> fmt does not escape |
00:29:48 | FromDiscord | <KingDarBoja> & does |
00:29:53 | FromDiscord | <KingDarBoja> Yup |
00:30:09 | FromDiscord | <Rika> try `var1.addr` -> `var1.addr.int` |
00:30:10 | FromDiscord | <Rika> or something |
00:30:17 | FromDiscord | <codic> that casts to int? |
00:30:31 | FromDiscord | <Rika> then feel free to also add a `:h` too if you want |
00:30:33 | FromDiscord | <codic> Arghhhhhhhhh. "got <ptr ptr char> but expected int" |
00:30:33 | FromGitter | <dawkot> if it doesn't work than castint (va1.addr) |
00:30:43 | FromGitter | <dawkot> whoops |
00:30:49 | FromDiscord | <Rika> `cast[int](var1.addr)` |
00:30:51 | FromGitter | <dawkot> `castint (var1.addr) |
00:30:52 | FromGitter | <dawkot> whew |
00:31:03 | FromDiscord | <Rika> brackets dont seem to like you right now |
00:31:04 | FromDiscord | <codic> finallyyy |
00:31:22 | FromDiscord | <exelotl> @codic also I'd say, in Nim you do different things depending on what semantics you're going for. For example when wrapping a C API you'd normally use `cstring` instead of `ptr char` |
00:32:08 | FromDiscord | <codic> true true |
00:32:12 | FromDiscord | <codic> just an example |
00:33:05 | FromDiscord | <KingDarBoja> How can I shortcircuit and assign? |
00:33:32 | FromDiscord | <Rika> @codic ok, just realized something |
00:33:32 | FromDiscord | <KingDarBoja> Like `let a = not someInstance.isNil and someIstance.someProp` ? |
00:33:38 | FromDiscord | <exelotl> and if you have a pointer to some other type and you want to be able to index it (as in `myArray[5]`, you'd use `var myArray:ptr UncheckedArray[T]` instead of `var myArray: ptr T` |
00:33:43 | FromDiscord | <Rika> you're getting the pointer of the pointer of the character |
00:33:50 | FromDiscord | <codic> oh |
00:34:07 | FromDiscord | <Rika> so if you want the first pointer, do `cast[int](var1)` |
00:34:22 | FromDiscord | <codic> Ohh |
00:34:27 | FromDiscord | <codic> wait what |
00:34:33 | FromDiscord | <codic> now it's saying the address of the variable is 0 |
00:34:37 | FromDiscord | <Rika> var1 is a `ptr char` no? |
00:34:40 | FromDiscord | <Rika> really? huh |
00:34:41 | FromDiscord | <codic> yes |
00:34:56 | FromDiscord | <Rika> :thonk: |
00:35:05 | FromDiscord | <codic> lemme put it in playground |
00:35:09 | FromDiscord | <exelotl> wow that's a high quality thonk |
00:35:17 | FromDiscord | <codic> import strformat |
00:35:17 | FromDiscord | <codic> var var1: ptr char |
00:35:17 | FromDiscord | <codic> echo &"The address of the variable var1 is {cast[int](var1)}" |
00:35:21 | FromDiscord | <codic> https://play.nim-lang.org/#ix=2keL |
00:35:23 | FromDiscord | <codic> there ya go |
00:35:31 | FromDiscord | <codic> even the playground says 0 |
00:35:32 | FromDiscord | <Rika> ah |
00:35:32 | FromDiscord | <Rika> yeah |
00:35:36 | FromDiscord | <Rika> its not initialized |
00:35:46 | FromDiscord | <codic> what isnt? |
00:35:47 | FromDiscord | <Rika> so it's currently `nil` |
00:35:51 | FromDiscord | <Rika> the ptr char |
00:35:54 | FromDiscord | <Rika> its nil right now |
00:36:03 | FromDiscord | <codic> ah |
00:36:16 | FromDiscord | <codic> so `var var1: ptr char = 'o'` |
00:36:19 | FromDiscord | <codic> For it to be something? |
00:36:37 | FromDiscord | <codic> nvm |
00:36:44 | FromDiscord | <codic> That gives got char but expected ptr har |
00:36:47 | FromDiscord | <codic> *char |
00:37:01 | FromDiscord | <codic> Cant I just get the addr? |
00:37:04 | FromGitter | <bung87> you misunderstood declaration and initialization |
00:37:44 | FromDiscord | <Rika> @codic https://play.nim-lang.org/#ix=2keM |
00:38:06 | FromDiscord | <Rika> now the ptr has no char assigned to it (zeroed out char \0) but it has a pointer now |
00:38:33 | FromDiscord | <Rika> this is not idiomatic by the way |
00:38:47 | FromDiscord | <Rika> we dont use raw ptrs for just (nonffi) nim code |
00:39:41 | FromDiscord | <codic> i know |
00:39:53 | FromDiscord | <codic> thanks |
00:40:10 | FromDiscord | <KingDarBoja> What about my question Rika? |
00:40:11 | FromDiscord | <KingDarBoja> 😄 |
00:40:17 | FromDiscord | <Rika> i missed it |
00:40:19 | FromDiscord | <Rika> one moment |
00:40:57 | FromDiscord | <Rika> i dont get what you're trying to do |
00:41:12 | FromDiscord | <Rika> you're assigning a bool? |
00:41:42 | FromDiscord | <KingDarBoja> No, a type |
00:41:58 | FromDiscord | <Rika> huh? can you describe what you're trying to do exactly |
00:42:03 | * | donger quit (Remote host closed the connection) |
00:42:13 | FromDiscord | <KingDarBoja> I know this is gonna sound annoying but |
00:42:19 | FromDiscord | <Rika> dont worry |
00:42:25 | FromDiscord | <Rika> ive dealt with a lot of annoying |
00:42:43 | FromDiscord | <KingDarBoja> In python, you can check if a type exist and use `and` to perform short-circuit assignment |
00:43:06 | FromDiscord | <KingDarBoja> In this case, if the loc prop is not nil, then assign the loc.startToken value to the variable |
00:43:30 | FromDiscord | <KingDarBoja> But probably better use if-else uh? |
00:43:37 | FromDiscord | <Rika> use an inline if else |
00:43:43 | FromDiscord | <Rika> we're not python |
00:43:47 | FromDiscord | <Rika> we're not dynamic |
00:45:44 | FromDiscord | <KingDarBoja> Just curious, calm down mate :d |
00:46:16 | FromDiscord | <Rika> im not mad im just sayin yo |
00:46:25 | FromDiscord | <KingDarBoja> yo |
00:46:42 | FromDiscord | <codic> how do I make the equal of a `char[length]` from c |
00:46:52 | FromDiscord | <codic> Just char[length]? 🤔 |
00:46:57 | FromDiscord | <Rika> what is char[length] |
00:47:04 | FromDiscord | <Rika> please describe, since im not well versed in c |
00:48:47 | * | Tlongir joined #nim |
00:50:12 | FromDiscord | <codic> creates a char of length *length* |
00:50:31 | FromDiscord | <Rika> a char array? |
00:50:36 | FromDiscord | <codic> yes |
00:50:49 | FromDiscord | <codic> which is basically what a C string (from string.h) is |
00:51:00 | FromDiscord | <Rika> that would be var a = newSeq[char](length) |
00:51:24 | FromDiscord | <Rika> if you need to interop with C, use a cstring |
00:52:02 | FromDiscord | <codic> ah ok |
00:53:08 | FromDiscord | <codic> yeah I know |
00:53:16 | FromDiscord | <codic> this is just for a line by line port of some c |
00:53:59 | * | ryan_ joined #nim |
00:54:10 | * | ryan_ is now known as Tangor |
00:54:39 | FromDiscord | <Rika> ive done that once |
00:54:49 | FromDiscord | <codic> haha |
00:55:15 | FromDiscord | <codic> Okay, now I have `for (size_t i = 0; i < 20; i++)`. I'm not very sure on how nim for loops work but do know that size_t is csize_t. Any tips on how I could port that for? |
00:56:12 | FromDiscord | <Rika> `for i in 0..<20` |
00:56:24 | FromDiscord | <Rika> dont forget colon and indent instead of bracket |
00:56:26 | FromDiscord | <codic> that uses ints though |
00:56:28 | FromDiscord | <codic> yeah of course haha |
00:56:36 | * | Tlongir quit (Ping timeout: 256 seconds) |
00:56:40 | FromDiscord | <Rika> size_t is an int is it not |
00:57:08 | FromDiscord | <Rika> `size_t is an unsigned integer type of at least 16 bit (see sections 7.17 and 7.18.3).` |
00:57:19 | FromDiscord | <codic> oh is it, alright |
00:57:31 | FromDiscord | <codic> not a c expert haha |
00:57:53 | FromDiscord | <Rika> you only need to know a bit of c to know this but thats fine, c isnt a language id expect most people to know |
00:58:04 | FromDiscord | <codic> true |
00:58:38 | FromDiscord | <codic> Can I do ` var alphabet: ptr string = "abc";`? |
00:58:47 | FromDiscord | <codic> Or will I have to do it another way |
00:58:55 | FromDiscord | <Rika> you need to allocate the pointer first |
00:58:57 | FromDiscord | <codic> Because I remember doing that with a char gave me a type mismatch |
01:00:03 | FromDiscord | <codic> ah, how? |
01:00:15 | FromDiscord | <Rika> same way i did before |
01:00:56 | FromDiscord | <Rika> var alphabet: ptr string; alphabet = create string; alphabet[] = "abc" |
01:01:27 | FromDiscord | <codic> ah |
01:01:33 | FromDiscord | <Rika> a string is already internally a pointer though, so this is a double indirection |
01:01:59 | FromDiscord | <codic> wdym |
01:02:55 | FromDiscord | <Rika> internally a `string` is represented by a `ptr something` where something is the thing i do not know of LOL |
01:03:07 | FromDiscord | <Rika> so by doing `ptr string` you are doing `ptr ptr something` |
01:03:13 | FromDiscord | <Rika> double pointer; double indirection |
01:03:16 | FromDiscord | <codic> oh |
01:03:19 | skrylar[m] | strings are seqs of chars or somesth |
01:03:27 | FromDiscord | <codic> Is it the same concept in c? |
01:03:33 | FromDiscord | <KingDarBoja> https://imgur.com/QC5Wm9s ❤️ Rika-sensei |
01:03:36 | FromDiscord | <codic> because I'm just porting the c code with no knowledge |
01:03:43 | skrylar[m] | yes seqs are your usual stretchy buffer/vector |
01:03:58 | FromDiscord | <codic> ? |
01:04:12 | FromDiscord | <codic> no I'm talking about double indirection |
01:04:45 | FromDiscord | <Rika> those are more suites that i have tests xd |
01:04:50 | FromDiscord | <Rika> i dont like writing tests.... |
01:05:06 | FromDiscord | <KingDarBoja> Bro, that's 2 suites for one module test |
01:05:11 | FromDiscord | <KingDarBoja> And the second one is WIP |
01:05:20 | FromDiscord | <KingDarBoja> Writing the missing ones right now 😄 |
01:05:31 | FromDiscord | <KingDarBoja> But happy to see them passing as I port the tests |
01:07:58 | FromDiscord | <Rika> yeah i have 0 tests because i have to write them myself (for my osu lib) |
01:08:05 | FromDiscord | <codic> Hm. "Tabs are not allowed" but...but... I don't have tests |
01:08:06 | FromDiscord | <Rika> @codic wdym? |
01:08:16 | FromDiscord | <Rika> > Hm. "Tabs are not allowed" but...but... I don't have tests |
01:08:16 | FromDiscord | <Rika> @codic use space indentation |
01:08:38 | FromDiscord | <Rika> wdym about the double indirection btw? |
01:08:38 | FromDiscord | <codic> wait why did i say tests |
01:08:45 | FromDiscord | <codic> I meant spaces, I do have spaces |
01:08:50 | FromDiscord | <codic> I was asking if in C |
01:08:52 | FromDiscord | <Rika> are you totally sure |
01:09:09 | FromDiscord | <Rika> C can do double indirection but its really not a good sign |
01:09:12 | FromDiscord | <codic> a `string` is a `*something` |
01:09:19 | FromDiscord | <Rika> yeah thats 1 pointer only |
01:09:19 | FromDiscord | <codic> pretty sure |
01:09:24 | FromDiscord | <codic> ah |
01:09:30 | FromDiscord | <Rika> since youre writing the internal representation itself |
01:09:35 | FromDiscord | <Rika> and not pointer of string |
01:09:37 | FromDiscord | <codic> https://play.nim-lang.org/#ix=2keV |
01:09:50 | FromDiscord | <codic> there's my code that nim is saying uses tabs |
01:10:17 | FromDiscord | <codic> strangee |
01:10:38 | FromDiscord | <Rika> see where my cursor is |
01:10:38 | FromDiscord | <Rika> https://cdn.discordapp.com/attachments/371759389889003532/705586949020188712/unknown.png |
01:11:17 | FromDiscord | <codic> yes |
01:11:27 | FromDiscord | <codic> can't have trailing whitespace? |
01:11:40 | FromDiscord | <Rika> can but thats a tab |
01:11:47 | FromDiscord | <Rika> not even a trailing tab is allowed |
01:11:56 | FromDiscord | <codic> Yay |
01:11:56 | FromDiscord | <codic> fixe |
01:11:59 | FromDiscord | <codic> *fixed |
01:12:03 | FromDiscord | <codic> to be met by a new error |
01:12:13 | FromDiscord | <codic> identifier expected, but got keyword end |
01:12:18 | FromDiscord | <codic> Ohhh |
01:12:20 | FromDiscord | <Rika> well of course, the proc isnt finished in terms of conversion |
01:12:21 | FromDiscord | <codic> Nvm I know the fix |
01:12:29 | FromDiscord | <Rika> end is a keyword |
01:12:31 | FromDiscord | <Gary M> hey so, I'm trying to learn how to use threads but nimsuggest doesn't like any of it |
01:12:47 | FromDiscord | <Gary M> it compiles and runs but the ide experience is fucked |
01:12:54 | FromDiscord | <codic> frick |
01:12:56 | FromDiscord | <codic> Still same error |
01:13:12 | FromDiscord | <codic> i thought it was cuz my var on line 7 was messed up |
01:13:23 | FromDiscord | <codic> Ohhhh end is a keyword so I have to do \`end` |
01:13:32 | FromDiscord | <Rika> yeah threads are super fucky with nimsuggest from what i recall |
01:13:37 | FromDiscord | <Rika> yes |
01:13:43 | FromDiscord | <codic> ah ok |
01:13:55 | FromDiscord | <codic> welp. failed with this line ` *(str++) = alphabet[counter % alen]` |
01:13:57 | FromDiscord | <Rika> this really isnt super idiomatic nim |
01:13:58 | FromDiscord | <codic> At least I was closed |
01:14:01 | FromDiscord | <codic> for sure it's not |
01:14:12 | FromDiscord | <Rika> that is super fucky c code that line |
01:14:23 | FromDiscord | <codic> is it `ptr str++`? |
01:14:39 | FromDiscord | <Rika> okay |
01:14:46 | FromDiscord | <Rika> can i do it instead? |
01:14:53 | FromDiscord | <Rika> its a kinda complicated fix |
01:15:00 | FromDiscord | <codic> sure |
01:15:12 | FromDiscord | <Rika> you shouldnt be doing this at all... |
01:15:23 | FromDiscord | <Rika> but i wanna try my hand at doing it |
01:15:26 | FromDiscord | <codic> i agree |
01:15:28 | FromDiscord | <codic> But fun is fun |
01:15:33 | FromDiscord | <Rika> i wont make it idiomatic |
01:15:40 | FromDiscord | <codic> haha |
01:15:44 | FromDiscord | <Rika> got a new paste? |
01:15:53 | FromDiscord | <codic> https://play.nim-lang.org/#ix=2keW |
01:16:27 | FromDiscord | <Rika> uh nothing changed |
01:16:34 | FromDiscord | <Rika> still have the broken alen |
01:17:29 | FromDiscord | <KingDarBoja> Should I worry about this hint after running the test suite? |
01:17:33 | FromDiscord | <KingDarBoja> "Hint: 116259 LOC; 3.285 sec; 155.301MiB peakmem; Debug build;" |
01:17:49 | FromDiscord | <Rika> i dont see whats worrying |
01:18:01 | FromDiscord | <codic> oof |
01:18:05 | FromDiscord | <KingDarBoja> That's why I am asking, I don't understand at all the first thing |
01:18:15 | FromDiscord | <codic> aaaaah die, stupid `*(str++)` |
01:18:18 | FromDiscord | <KingDarBoja> the sec is the compile time right? |
01:18:32 | FromDiscord | <codic> maybe `ptr str + 1` |
01:18:32 | FromDiscord | <KingDarBoja> The second parameter ofc |
01:20:10 | FromDiscord | <Rika> codic, dont worry about that, its much more complicated than you think |
01:20:23 | FromDiscord | <codic> hm |
01:20:34 | FromDiscord | <codic> welp |
01:20:39 | FromDiscord | <Rika> can i see the original code? |
01:20:54 | FromDiscord | <codic> Sure |
01:21:08 | FromDiscord | <codic> gimme a sec |
01:21:10 | FromDiscord | <codic> https://hatebin.com/dbvnqqvlkh |
01:21:18 | FromDiscord | <codic> Gotta head out, brb in 15 min |
01:28:00 | FromDiscord | <Gary M> if threads is a system module why can't nimsuggest see it |
01:29:30 | zacharycarter | My first suggestion is not using nimsuggest |
01:29:56 | zacharycarter | but I don't know - maybe because you didn't import the module |
01:30:17 | zacharycarter | and it's only included when a compile flag is set |
01:30:29 | FromDiscord | <Gary M> threads > Note: This is part of the system module. Do not import it directly. |
01:31:00 | FromDiscord | <Gary M> I can't not use nimsuggest... it's the only thing that's making vs code support work lol |
01:31:16 | FromDiscord | <KingDarBoja> F |
01:31:54 | FromDiscord | <Gary M> so I'm trying to work with threads, which do compile and run with the threads flag as intended |
01:31:54 | zacharycarter | it used to annoy the hell out of me when I used VS Code |
01:32:02 | FromDiscord | <Gary M> https://i.imgur.com/8oooeyn.png |
01:32:37 | FromDiscord | <Gary M> but everything is broken really bad trying to work with it |
01:33:01 | zacharycarter | I'm not sure :/ I don't use VS Code anymore |
01:33:10 | zacharycarter | I do use threads though |
01:33:44 | FromDiscord | <Gary M> this is a little depressing lol |
01:33:48 | FromDiscord | <treeform> I think creating a config.nims and adding a line `--d:threads` will help the VS Code |
01:33:59 | FromDiscord | <treeform> @Gary M ^ |
01:35:09 | FromDiscord | <treeform> sorry its `--threads:on` not the other other thing |
01:35:51 | FromDiscord | <treeform> |
01:35:51 | FromDiscord | <treeform> https://cdn.discordapp.com/attachments/371759389889003532/705593296512221245/unknown.png |
01:35:57 | FromDiscord | <treeform> No Thread errors. |
01:36:26 | FromDiscord | <Gary M> ahh that seems to do it yeah |
01:36:33 | FromDiscord | <Gary M> now I just have the errors in the nims file 😄 |
01:36:35 | FromDiscord | <Rika> https://play.nim-lang.org/#ix=2kf4 @codic |
01:36:41 | FromDiscord | <Gary M> https://i.imgur.com/iSh0lKF.png |
01:36:46 | FromDiscord | <Rika> its horrible btw, this proc you made me write |
01:36:56 | FromDiscord | <treeform> I don't have that. Strange. |
01:37:02 | FromDiscord | <codic> > its horrible btw, this proc you made me write |
01:37:05 | FromDiscord | <treeform> well just close the nims file |
01:37:06 | zacharycarter | Rika: do you want to fill us in on why axion would rather die than use Nim again? |
01:37:08 | FromDiscord | <codic> But... but.... I didn't make you do anything |
01:37:18 | zacharycarter | he made you his proxy |
01:37:23 | FromDiscord | <Rika> zacharycarter: axion really dislikes how araq handles nim |
01:37:32 | FromDiscord | <codic> haha |
01:37:33 | FromDiscord | <Rika> @codic i mean, this proc |
01:37:36 | FromDiscord | <Rika> not that you made me write it |
01:37:40 | FromDiscord | <Rika> but its just horrible |
01:37:54 | FromDiscord | <codic> lol |
01:38:06 | FromDiscord | <codic> you expanded my dowhile 😢 |
01:38:08 | FromDiscord | <Rika> axion just really doesnt like his stubbornness |
01:38:22 | FromDiscord | <Rika> codic: i did it just to make sure it wasnt doing the error |
01:38:23 | FromDiscord | <treeform> @Rika your proc looks like C not nim. |
01:38:27 | FromDiscord | <Rika> you can collapse it back |
01:38:31 | FromDiscord | <codic> haha |
01:38:31 | FromDiscord | <Rika> @treeform it is intentional |
01:38:38 | FromDiscord | <Rika> codic wants it to look like C |
01:38:43 | FromDiscord | <Rika> i think |
01:38:49 | FromDiscord | <treeform> then they should use C? |
01:38:50 | FromDiscord | <Rika> he doesnt want idiomatic nim |
01:38:53 | FromDiscord | <Rika> I DONT KNOW |
01:38:55 | FromDiscord | <Rika> ask codic |
01:39:07 | zacharycarter | Rika: gotcha, thanks for the explanation |
01:39:29 | FromDiscord | <codic> i don't, this is just to see how far nim can go |
01:39:39 | zacharycarter | treeform: maybe he's not trying to use the GC? |
01:39:42 | FromDiscord | <Gary M> wait nvm the errors went away magically |
01:39:46 | FromDiscord | <Gary M> everything is good now |
01:39:46 | FromDiscord | <Rika> he (ax) also fears that nim will die because of this stubbornness, he thinks ar is making nim his experimental playfield |
01:39:55 | FromDiscord | <Gary M> @treeform thank you 😄 |
01:40:04 | zacharycarter | Rika: mfiano should hang out with krux-2 |
01:40:17 | FromDiscord | <Rika> yeah he also said that he likes krux |
01:40:42 | zacharycarter | haha I like krux too but Nim wouldn't exist without Araq and Araq is smarter than mfiano |
01:40:50 | zacharycarter | and krux as well |
01:40:59 | FromDiscord | <Rika> i cant say for sure that ar is smarter than ax |
01:41:06 | FromDiscord | <Rika> because i dont know them too well |
01:41:16 | FromDiscord | <Rika> im just a dumb highschooler damn it |
01:41:18 | zacharycarter | I can - the latter often wants to be the smartest in the room and isn't |
01:41:22 | FromDiscord | <codic> anyways rika your proc works perfectly |
01:41:32 | zacharycarter | I've interacted with him in multiple IRC channels |
01:41:42 | FromDiscord | <Rika> i hope i can trust your word |
01:41:46 | FromDiscord | <codic> just one difference - instead of one line with everything comma seperated each thing is on a different line |
01:41:57 | FromDiscord | <Rika> and i really hope nim doesnt die out |
01:41:58 | FromDiscord | <codic> i think i can fix that |
01:42:04 | FromDiscord | <codic> yeah it'd be sad to see it go |
01:42:04 | FromDiscord | <Rika> codic: is that not how its supposed to work??? |
01:42:18 | FromDiscord | <codic> No, turns out the code the person gave me is wrong because hes an idiot |
01:42:22 | FromDiscord | <codic> hahaha |
01:42:23 | FromDiscord | <Rika> nice. |
01:42:32 | FromDiscord | <Rika> give me the updated code, ill write idiomatic nim this time |
01:42:44 | FromDiscord | <codic> how do I write to stdout without an extra newline? |
01:42:50 | FromDiscord | <codic> sure after i get this |
01:42:54 | FromDiscord | <Rika> stdout.write theString |
01:42:58 | FromDiscord | <codic> o |
01:43:17 | zacharycarter | Rika: mfiano uses common lisp lol, which is arguably more niche than Nim at this point |
01:43:46 | FromDiscord | <Rika> im not a fan of bashing languages |
01:44:00 | FromDiscord | <Rika> even if i do it, some half of me dislikes me doing that |
01:44:15 | zacharycarter | it's not an attempt to bash a language - I dont really have a dislike of common lisp |
01:44:21 | FromDiscord | <Rika> i suspect i have some sort of fragmented personality issue or something |
01:44:38 | FromDiscord | <Rika> but its just a suspicion |
01:44:39 | FromDiscord | <Rika> anyway |
01:44:41 | zacharycarter | I'm just pointing out that worrying about a language disappearing would be a more valid worry based on the size of its community |
01:44:44 | FromDiscord | <Rika> what's wrong with common lisp? |
01:45:32 | zacharycarter | I think its ecosystem is probably smaller than Nims and I think it probably has less people writing code in it currently than Nim |
01:45:58 | zacharycarter | I was just commenting on your statment regarding worrying about Nim disappearing |
01:46:24 | zacharycarter | Nim already has a 1.0 release behind its belt and there's a ton of work going into the next major release, ala the new memory management |
01:46:37 | FromDiscord | <Zed> How many keywords does nim have? |
01:46:42 | FromGitter | <dawkot> Isn't Nim kind of at it's peak popularity, excluding right after 1.0 release? |
01:47:06 | zacharycarter | it is I imagine |
01:47:14 | FromGitter | <dawkot> If true, it was much more in danger of dying out then than now |
01:47:24 | FromDiscord | <codic> lemme get the error |
01:47:24 | FromDiscord | <codic> /usercode/in.nim(21, 9) Error: ambiguous call; both io.write(f: File, a: varargs[string]) [declared in /playground/nim/lib/system/io.nim(396, 6)] and io.write(f: File, c: cstring) [declared in /playground/nim/lib/system/io.nim(188, 6)] match for: (File, ptr char) |
01:47:30 | zacharycarter | yeah Nim's been in development for over a decade |
01:47:54 | FromDiscord | <codic> Also tried `write stdout, str` |
01:48:08 | FromDiscord | <Zed> write(stdout,"string here") |
01:48:08 | FromDiscord | <codic> sad |
01:48:11 | FromDiscord | <codic> oh |
01:48:13 | FromDiscord | <codic> let's see |
01:48:31 | FromDiscord | <codic> same error |
01:48:38 | FromDiscord | <codic> this is a seq not a string btw |
01:48:39 | FromDiscord | <codic> Oohhhhhhh |
01:48:45 | FromDiscord | <codic> That's why it prints on multiple lines |
01:48:51 | FromDiscord | <Zed> convert it to a string? |
01:49:00 | FromDiscord | <codic> Is there something like Seq.join? |
01:49:00 | FromDiscord | <Rika> its a seq? |
01:49:03 | FromDiscord | <Zed> using .repr |
01:49:12 | FromDiscord | <Rika> im so confused to what you're trying to do |
01:49:26 | FromDiscord | <Zed> write(stdout, sequence.repr) |
01:49:35 | FromDiscord | <codic> trying |
01:49:42 | FromDiscord | <codic> Uhhhh |
01:49:45 | FromDiscord | <KingDarBoja> Okay I am getting tired of casting cuz OOP |
01:49:51 | FromDiscord | <Rika> sometimes i just wish i could see what the hell your code looks like right now |
01:49:55 | FromDiscord | <codic> I get a buncha `ptr thing -> 't'` |
01:49:55 | FromDiscord | <codic> Lo |
01:49:58 | FromDiscord | <codic> *lol |
01:49:59 | FromDiscord | <codic> wait |
01:50:05 | FromDiscord | <Zed> iterate over the sequence |
01:50:05 | FromDiscord | <codic> https://play.nim-lang.org/#ix=2kf6 |
01:50:09 | FromDiscord | <Zed> and print each value |
01:50:29 | FromDiscord | <codic> `for t in str: echo t` |
01:50:31 | FromDiscord | <codic> let's try that |
01:50:37 | FromDiscord | <codic> Nope |
01:50:41 | FromDiscord | <codic> That is *not* what I want |
01:51:24 | FromDiscord | <codic> Never mind |
01:51:27 | FromDiscord | <Rika> i dont get what you're doing |
01:51:29 | FromDiscord | <codic> I am just plain utter stupid |
01:51:38 | FromDiscord | <Rika> the reason there are newlines is because of the for loop |
01:51:42 | FromDiscord | <codic> yeah, ignore me |
01:51:45 | * | chemist69 quit (Ping timeout: 240 seconds) |
01:51:48 | FromDiscord | <codic> I'm just stupid as stupidness |
01:51:50 | FromDiscord | <codic> lol |
01:52:05 | FromDiscord | <codic> The person who wrote the original c code piped it thru `tr` |
01:52:13 | FromDiscord | <codic> and replaced all newlines with commas |
01:53:18 | FromDiscord | <Rika> smh |
01:53:20 | FromDiscord | <Rika> smh smh |
01:53:25 | FromDiscord | <Rika> double stupid, your friend is |
01:53:44 | * | chemist69 joined #nim |
01:54:40 | FromDiscord | <codic> ayy |
01:55:12 | FromDiscord | <codic> final code if you want to idiomacize it |
01:55:13 | FromDiscord | <codic> https://hatebin.com/ffoyvjeaut |
01:56:40 | FromDiscord | <Rika> hey! you stole my code! 1/2jk |
01:58:49 | FromDiscord | <codic> lol |
01:59:04 | FromDiscord | <codic> oh yeah |
01:59:06 | FromDiscord | <codic> it is the same code |
01:59:09 | FromDiscord | <codic> posting that was useless |
01:59:26 | FromDiscord | <codic> wasted 2-3b on hatebin's server wherever it is |
01:59:27 | FromDiscord | <codic> smh |
02:00:54 | FromDiscord | <bedwardly-down> So, a guy ruined my nostalgia trip by telling me that i need to come this discord to nerd out without having to jump on the irc channel... i mean, hello all. 👋 |
02:01:07 | FromDiscord | <treeform> hello |
02:01:32 | FromDiscord | <KingDarBoja> WAT |
02:01:32 | FromDiscord | <codic> Hey! |
02:01:36 | FromDiscord | <codic> lol |
02:01:39 | FromDiscord | <bedwardly-down> Hello |
02:01:45 | FromDiscord | <Gary M> I didn't say you "needed to" |
02:01:50 | FromDiscord | <Rika> hello down |
02:01:53 | FromDiscord | <bedwardly-down> 🤪 |
02:01:55 | FromDiscord | <KingDarBoja> Hello up |
02:02:06 | FromDiscord | <KingDarBoja> 🍭 |
02:02:26 | FromDiscord | <bedwardly-down> He really didn’t. I just figured I’d jump in with a splash. 😂 |
02:03:32 | FromDiscord | <Rika> https://play.nim-lang.org/#ix=2kfb @codic semi-idiomatic, i can make it better but i am out of thinking juice |
02:03:35 | FromDiscord | <codic> if nim has an inbuilt function to get permutations... *sigh* |
02:03:39 | FromDiscord | <codic> alright thanks |
02:03:44 | FromDiscord | <Gary M> Welcome to the nimmuity bedwardude |
02:04:08 | FromDiscord | <Gary M> I know it's not quite what you're used to with haxe but hope you end up liking it lol |
02:04:13 | FromDiscord | <codic> Why `var alphabet:string = "abc"`? type inference |
02:04:25 | FromDiscord | <Rika> https://nim-lang.org/docs/algorithm.html#nextPermutation%2CopenArray%5BT%5D ?????? @codic |
02:04:26 | FromDiscord | <codic> same with str:string |
02:04:30 | FromDiscord | <codic> nooooooooooooooooooooo |
02:04:34 | FromDiscord | <codic> my whole purpose has died |
02:04:36 | FromDiscord | <Rika> bruh |
02:04:38 | FromDiscord | <bedwardly-down> Actually, Haxe has its levels of cringe woth awesomeness |
02:04:45 | FromDiscord | <bedwardly-down> With* |
02:04:56 | FromDiscord | <codic> wait, I meant for a string |
02:05:00 | FromDiscord | <codic> not seq |
02:05:08 | FromDiscord | <Rika> haxe legit looks interesting but i dont like langs w/ braces |
02:05:15 | FromDiscord | <treeform> what are you guys doing every combinations of a,b and c? |
02:05:17 | FromDiscord | <Rika> its just too ingrained in me to not use braces |
02:05:27 | FromDiscord | <codic> tbh the one thing I hate about nim is no braces |
02:05:33 | FromDiscord | <Gary M> Lol |
02:05:37 | FromDiscord | <codic> @treeform i was tryna port a permutation function from |
02:05:40 | FromDiscord | <codic> *from C |
02:05:51 | FromDiscord | <Gary M> Nobody ever seems to be 100% satisfied with any language they use |
02:06:00 | FromDiscord | <treeform> I am pretty satisfied with Nim. |
02:06:03 | FromDiscord | <treeform> I am pretty satisfied with Nim. |
02:06:14 | FromDiscord | <Rika> rest in peace irc users |
02:06:16 | FromDiscord | <Elegant Beef> Yea but you actually know how to use it 😄 |
02:06:38 | FromDiscord | <Rika> @codic always search the standard library first before you port something 😛 |
02:06:42 | FromDiscord | <Gary M> Mr. Elegant "Doesn't like spaces over tabs" Beef |
02:06:48 | FromDiscord | <codic> :P |
02:07:00 | FromDiscord | <bedwardly-down> Honestly c and c++ make me cringe |
02:07:01 | FromDiscord | <codic> eh |
02:07:03 | FromDiscord | <codic> was more fun anyways |
02:07:06 | FromDiscord | <Rika> why? |
02:07:12 | FromDiscord | <Rika> whats so cringe w/ c |
02:07:40 | FromDiscord | <bedwardly-down> But that’s because I haven’t spent enough time with either doing things that interest me. 🤪 |
02:07:40 | FromDiscord | <Elegant Beef> I mean tabs allow customizabillity |
02:07:53 | FromDiscord | <Elegant Beef> So this is why i will never say spaces are better |
02:08:00 | FromDiscord | <Gary M> It looks and feels old and c "strings" are annoying |
02:08:02 | FromDiscord | <codic> go ftw |
02:08:09 | FromDiscord | <Rika> > go |
02:08:11 | FromDiscord | <codic> What's the use of the go gc for nim anyways? |
02:08:26 | FromDiscord | <Rika> if you want to ffi with go w/ nim |
02:08:30 | FromDiscord | <Rika> in* |
02:08:33 | FromDiscord | <Rika> not w/ |
02:08:43 | FromDiscord | <Gary M> Interop with go |
02:08:51 | FromDiscord | <Gary M> I wouldn't use it otherwise |
02:09:06 | FromDiscord | <Rika> man im too mentally exhausted to argue about spaces and tabs and languages and braces and shit |
02:09:07 | FromDiscord | <codic> wait you can interop with go? |
02:09:09 | FromDiscord | <codic> :gasp: |
02:09:21 | FromDiscord | <Rika> that shits tiring and leads to no good conclusion |
02:09:23 | FromDiscord | <KingDarBoja> I haveno issues with braces |
02:09:24 | FromDiscord | <codic> my opinion of nim is just rising and rising |
02:09:25 | FromDiscord | <bedwardly-down> I kind want to try out making nim bindings for haxe simply to learn how to make bindings for future purposes |
02:09:29 | FromDiscord | <KingDarBoja> I use Typescript / Python so |
02:09:42 | FromDiscord | <Rika> i can use a language w/ braces, i just dont like them |
02:09:50 | FromDiscord | <codic> i like braces because copy paste issues with indentation not being consistent |
02:09:50 | FromDiscord | <treeform> it looks like your function does not permute correctly? Its missing permutations? What should the real output be? |
02:09:55 | FromDiscord | <Elegant Beef> Rika it's purely about customizabillity for me spaces mean that it's the same on everyone which is inheritely bad since it's not to what they like |
02:09:56 | FromDiscord | <Rika> i dont care what you use, i use spaces, go convert that to what you use if you want |
02:09:58 | FromDiscord | <KingDarBoja> 🔝 |
02:10:02 | FromDiscord | <Rika> dont fucking make me convert to what you use |
02:10:03 | FromDiscord | <KingDarBoja> What codic said |
02:10:30 | FromDiscord | <KingDarBoja> I am not going to convert you ❤️ |
02:10:37 | * | FromDiscord <KingDarBoja> cast[Rika] |
02:10:42 | FromDiscord | <Rika> > it looks like your function does not permute correctly? Its missing permutations? What should the real output be? |
02:10:42 | FromDiscord | <Rika> @treeform its intentional because theres the counter variable that limits output |
02:10:50 | FromDiscord | <Rika> SIGSEGV |
02:10:56 | FromDiscord | <codic> yeah, I can remove the counter |
02:11:04 | FromDiscord | <Gary M> cast[object](Rika) |
02:11:15 | FromDiscord | <Rika> Segmentation Fault: core dumped |
02:11:30 | FromDiscord | <codic> cast[cstring]("Rika") |
02:11:44 | FromDiscord | <codic> if i understand what casting is that'll convert you to a cstring |
02:11:53 | FromDiscord | <Gary M> Well |
02:11:54 | FromDiscord | <Rika> dont do that though |
02:12:01 | FromDiscord | <Gary M> You don't need to do that kind of cast for that |
02:12:02 | FromDiscord | <Elegant Beef> That's a last resort |
02:12:10 | FromDiscord | <KingDarBoja> Speaking of casting |
02:12:14 | FromDiscord | <Rika> you really should read the manual |
02:12:26 | FromDiscord | <Gary M> cast[] is essentially like a reinterpret cast you'd find in C++ |
02:12:32 | FromDiscord | <codic> i should |
02:12:32 | FromDiscord | <codic> I know I don't |
02:12:48 | FromDiscord | <Gary M> It'll treat the memory as though it was another type without doing any type conversion |
02:12:56 | FromDiscord | <Elegant Beef> This bit stream is now that type, congrats, you fucked it! |
02:13:00 | FromDiscord | <codic> how does nim cross compile? |
02:13:01 | FromDiscord | <bedwardly-down> Does cast work pretty similar to how it does in Java, though? |
02:13:06 | FromDiscord | <Gary M> Idk |
02:13:13 | FromDiscord | <KingDarBoja> https://github.com/KingDarBoja/Phosphate/blob/master/tests/language/test_parser.nim |
02:13:14 | FromDiscord | <Elegant Beef> normal type casting is done TypeB(obj) |
02:13:21 | FromDiscord | <KingDarBoja> Scroll down and face the cast hell |
02:13:27 | FromDiscord | <KingDarBoja> Darn OOP |
02:13:36 | FromDiscord | <KingDarBoja> Going to switch to object variants |
02:13:37 | FromDiscord | <codic> i saw an article somewhere but forgot it |
02:13:41 | FromDiscord | <codic> oof |
02:13:52 | FromDiscord | <bedwardly-down> If it does, then it’s comparable to haxe’s cast system |
02:13:55 | FromDiscord | <Gary M> cstring("Rika") |
02:14:01 | FromDiscord | <Rika> how does java do cast? |
02:14:01 | FromDiscord | <Elegant Beef> The cast[TypeB](ob) just says it's typeB and doesnt care about the data there |
02:14:08 | FromDiscord | <codic> found the basics `nim c --cpu:arch --os:os thing.nim` |
02:14:16 | FromDiscord | <codic> all based on https://www.reddit.com/r/nim/comments/avtq1u/nim_cross_compile_osx_to_linux_how_to/, lol |
02:14:22 | FromDiscord | <Rika> cast[]() is like the "i made this" meme |
02:14:25 | FromDiscord | <KingDarBoja> @Elegant Beef in my case, it is to force the type to be what's expected |
02:14:35 | FromDiscord | <KingDarBoja> As my objects have the correct type |
02:14:47 | FromDiscord | <Rika> this meme |
02:14:48 | FromDiscord | <Rika> https://cdn.discordapp.com/attachments/371759389889003532/705603093722824724/iu.png |
02:14:50 | FromDiscord | <KingDarBoja> But the "wrapper" proc will return it's parent type |
02:14:56 | FromDiscord | <Rika> "meme" |
02:15:01 | FromDiscord | <Rika> just a comic more of |
02:15:06 | FromDiscord | <bedwardly-down> Cast in Java - cast(var, new type) for the most part |
02:15:06 | * | FromDiscord <KingDarBoja> Trying inheritance stuff |
02:15:20 | FromDiscord | <Rika> @bedwardly-down what does it do exactly? |
02:15:33 | FromDiscord | <Elegant Beef> @bedwardly-down https://play.nim-lang.org/#ix=2kfg |
02:15:37 | FromDiscord | <Elegant Beef> Run that |
02:16:09 | FromDiscord | <bedwardly-down> Allows you to transition types between variables that come from the same base inheritance |
02:16:13 | * | monok joined #nim |
02:16:43 | FromDiscord | <Elegant Beef> That's not what cast[]() does |
02:16:46 | FromDiscord | <bedwardly-down> That’s not the same cast. |
02:16:53 | FromDiscord | <bedwardly-down> Point proven |
02:17:07 | FromDiscord | <KingDarBoja> Errr... |
02:17:14 | FromDiscord | <bedwardly-down> And it ran on mobile too with no issues |
02:17:14 | FromDiscord | <Elegant Beef> cast[]() just says this is type is a new type without any assurance |
02:17:17 | FromDiscord | <KingDarBoja> Guys |
02:17:22 | FromDiscord | <KingDarBoja> Thta's what I did lol |
02:17:23 | FromDiscord | <Rika> yes |
02:17:29 | FromDiscord | <KingDarBoja> -> Allows you to transition types between variables that come from the same base inheritance |
02:17:36 | FromDiscord | <codic> you can make mobile apps with nim?? |
02:17:37 | FromDiscord | <KingDarBoja> That's why I am using it |
02:17:44 | FromDiscord | <Rika> you do type(var) instead of cast[] for that |
02:17:52 | FromDiscord | <KingDarBoja> 🤔 |
02:17:56 | FromDiscord | <bedwardly-down> Cast in Java and Haxe is like getting a gender change in real life except not as permanent |
02:17:58 | FromDiscord | <Rika> nim can compile to objective c |
02:18:06 | FromDiscord | <KingDarBoja> Hold on, I will try |
02:18:16 | FromDiscord | <Gary M> Ok well we're talking about casting in nim |
02:18:23 | FromDiscord | <codic> that is only ios not android though |
02:18:28 | * | mono quit (Ping timeout: 246 seconds) |
02:18:31 | FromDiscord | <codic> And even in the ios scope do you have access to the UIKit apis? |
02:18:32 | FromDiscord | <Rika> @bedwardly-down see image i sent above to know what nim cast does |
02:18:43 | FromDiscord | <Rika> nim can compile to android target too yes |
02:18:43 | FromDiscord | <Elegant Beef> Also my nimplayground example |
02:18:50 | FromDiscord | <codic> |
02:18:50 | FromDiscord | <codic> https://cdn.discordapp.com/attachments/371759389889003532/705604110409400381/iu.png |
02:18:54 | FromDiscord | <codic> for convienence |
02:19:09 | FromDiscord | <codic> Ah, but do we have access to ui kit or whatever android uses |
02:19:16 | FromDiscord | <bedwardly-down> I saw. I get the impression of an identity complex there |
02:19:24 | FromDiscord | <codic> PreviousMessage.replace("or", "and") |
02:19:24 | FromDiscord | <KingDarBoja> Rika, u right |
02:19:41 | FromDiscord | <Gary M> 9 times out of 10 you just want a normal type cast int(someFloat) |
02:19:55 | FromDiscord | <KingDarBoja> But anyway, I don't want to use it (cast or type(var) ) if I have same types with the same parent type |
02:20:13 | FromDiscord | <KingDarBoja> That's why I need object variants afaik |
02:20:16 | FromDiscord | <Gary M> But sometimes you're dealing with some C API that is extra shitty and wants it to be a really specific type |
02:20:20 | FromDiscord | <Elegant Beef> Typically you'll only use the cast[]() from my experience with library bindings that return weird values |
02:20:48 | FromDiscord | <Elegant Beef> For instance the glfw bindings returning just `pointer` from a GetX11Window |
02:21:31 | FromDiscord | <KingDarBoja> Rip Rika |
02:21:43 | FromDiscord | <Rika> im still alive |
02:21:45 | FromDiscord | <bedwardly-down> Glfw is still much easier for me to get around than sdl2 the few times I’ve tried. Good to know |
02:21:45 | FromDiscord | <Rika> barely |
02:22:17 | zacharycarter | https://github.com/zacharycarter/frag/blob/master/src/frag.nim#L8-L31 - is there a better way to do this? |
02:22:46 | zacharycarter | https://github.com/zacharycarter/frag/blob/master/examples/00-minimal/minimal.nim#L3-L4 |
02:22:49 | zacharycarter | is the associated code |
02:23:03 | FromDiscord | <bedwardly-down> Although, using a straight getX11Window is cringe as a Linux user, @Elegant Beef |
02:23:10 | zacharycarter | all the code is in that repo - but I think it will probably only work on osx, I haven't tried it on any other OS yet |
02:23:20 | FromDiscord | <Elegant Beef> I mean i created a GLFW window and i wanted it as a X11 window |
02:24:06 | FromDiscord | <Elegant Beef> Since it was my status bar for my shitty wm 😄 |
02:24:57 | FromDiscord | <bedwardly-down> Gotya. I thought you meant explicitly stated in the code. When i see that, it can definitely lead to bad outcomes if the xorg versions aren’t compatible or someone is using straight Wayland or has shitty drivers |
02:25:24 | FromDiscord | <Elegant Beef> Yea was making a Xserver only wm |
02:25:36 | FromDiscord | <bedwardly-down> Got it |
02:25:37 | FromDiscord | <Elegant Beef> Which i guess is a dumpster fire that will be abandonwae |
02:25:44 | FromDiscord | <Elegant Beef> abandonware* |
02:25:50 | FromDiscord | <Gary M> Vaporware |
02:26:09 | FromDiscord | <Elegant Beef> Well no cause it works gary |
02:26:27 | FromDiscord | <Gary M> 👀 |
02:26:30 | FromDiscord | <bedwardly-down> Not really. Xserver is so deeply embedded in so much stuff that it’s not going anywhere for a good while still |
02:26:35 | FromDiscord | <KingDarBoja> Synthwave |
02:26:47 | FromDiscord | <Gary M> Sorry I meant trashware |
02:27:29 | * | muffindrake quit (Ping timeout: 246 seconds) |
02:27:30 | FromDiscord | <Elegant Beef> Bedwardly i mean my WM is a dumpster fire |
02:27:31 | FromDiscord | <bedwardly-down> It’s like systemd. Unless you choose an os that has some crazy smart people that are capable of stripping systemd completely out, you’re kind of stuck with it |
02:28:04 | FromDiscord | <treeform> @codic @Rika This is how I would do that strange code in nim style: https://play.nim-lang.org/#ix=2kfj |
02:28:07 | FromDiscord | <Gary M> Where's that fullscreen support in your wm haha |
02:28:17 | FromDiscord | <Elegant Beef> Feck off |
02:28:17 | FromDiscord | <Rika> bruh |
02:28:29 | FromDiscord | <Gary M> Is it perhaps literally crashing the wm |
02:28:31 | FromDiscord | <Rika> i said i have no more think juice |
02:28:32 | FromDiscord | <Elegant Beef> I got _NET_SUPPORTED atoms working |
02:28:33 | FromDiscord | <bedwardly-down> Does your wm at least play doom? |
02:29:02 | FromDiscord | <Elegant Beef> But it doesnt seem to send the _NET_WM_STATE_FULLSCREEN event that awesomewm gets |
02:29:09 | FromDiscord | <Rika> im out for now, i just wanna do nothing rn |
02:29:16 | FromDiscord | <Elegant Beef> Ok buh bye? |
02:29:20 | FromDiscord | <bedwardly-down> Night, rika |
02:29:37 | FromDiscord | <Rika> you're assuming its night |
02:29:41 | FromDiscord | <Elegant Beef> badwardly come work on goodwm with me and help me fix it up to be fully compliant! |
02:29:41 | FromDiscord | <Rika> when its actually 10 am |
02:29:48 | * | muffindrake joined #nim |
02:29:53 | FromDiscord | <Elegant Beef> hey it's night somewhere in the world |
02:30:26 | FromDiscord | <Gary M> Just come back to the land of winblows |
02:30:32 | FromDiscord | <Elegant Beef> Lol |
02:30:38 | FromDiscord | <Elegant Beef> Or i could just use any number of WMs |
02:30:45 | FromDiscord | <Gary M> Gross |
02:31:00 | FromDiscord | <Elegant Beef> Sorry i dont need small weeble wobbles when i move windows with my keyboard |
02:31:03 | FromDiscord | <Gary M> Windows explorer is the best wm |
02:31:10 | FromDiscord | <bedwardly-down> Where would i start, Beef? |
02:31:19 | FromDiscord | <Gary M> Learning Nim, probably |
02:31:29 | FromDiscord | <Elegant Beef> *If you're serious, after learning nim go look at xlib and learn how Xlib works |
02:32:00 | FromDiscord | <Elegant Beef> I'll properly setup my nimble stuff anyway been pushing that off for too long 😄 |
02:33:06 | FromDiscord | <Rika> bruh dont actually do what he says |
02:33:08 | FromDiscord | <bedwardly-down> Xlib shouldnt be super difficult since i least know the basics of how the xserver stack works |
02:33:12 | FromDiscord | <Rika> why am i still here |
02:33:23 | FromDiscord | <Rika> i really need to do something else |
02:33:49 | FromDiscord | <bedwardly-down> Because you want me, Rika. I’m new and everybody wants me always. 😈 |
02:34:11 | FromDiscord | <Elegant Beef> Cant tell why rika is saying dont do what i say |
02:34:16 | FromDiscord | <KingDarBoja> Because we love you 🙂 |
02:34:27 | FromDiscord | <KingDarBoja> But yeah, you should take a rest 😄 |
02:34:44 | FromDiscord | <bedwardly-down> I miss beef, tbh. It’s just straight up too expensive right now to buy |
02:35:18 | FromDiscord | <bedwardly-down> A 16 ounce tube of ground chuck is like $6 right now. It’s nuts |
02:35:44 | FromDiscord | <Gary M> Beef why did you raise your prices |
02:35:54 | FromDiscord | <Elegant Beef> Im elegant, im worth it trust me |
02:35:56 | FromDiscord | <Rika> how did beef suddenly convert into nuts |
02:36:16 | FromDiscord | <Elegant Beef> We obviously have spoken much, i am crazy |
02:36:35 | FromDiscord | <Gary M> cast[nuts](groundChuck) |
02:36:55 | FromDiscord | <KingDarBoja> cast[cast[cast[...]]] |
02:37:00 | * | FromDiscord <KingDarBoja> Recursive casting |
02:37:41 | FromDiscord | <bedwardly-down> Hamburgers with peanut butter and swiss on a wheat bun - 🤤 |
02:37:43 | FromDiscord | <Gary M> Wouldn't it be more like cast[](cast[](cast[]))) |
02:37:53 | FromDiscord | <Gary M> Wouldn't it be more like cast[](cast[](cast[]())) |
02:38:05 | FromDiscord | <Rika> why is the nim discord so magnetic for me |
02:38:18 | FromDiscord | <Gary M> Sorry for edit irc rip u guys |
02:38:40 | FromDiscord | <Elegant Beef> Rika you just know a good chat group when you see them |
02:39:05 | FromDiscord | <Rika> why do you think im in 100 discord servers |
02:39:21 | FromDiscord | <Elegant Beef> But you're currently active here, that says a lot what you think about us |
02:39:21 | Prestige | Hey Beef, I tried destroying windows with a ClientMessage and atom like you do. I noticed something strange - If I do not explicitly focus a new window after that window is destroyed, XGetInputFocus returns the ID of the destroyed window. Did you see the same behavior? |
02:39:44 | FromDiscord | <Elegant Beef> Yes but i just call refocus after |
02:39:50 | FromDiscord | <Elegant Beef> Yes but i'll just call refocus after |
02:40:05 | FromDiscord | <KingDarBoja> 100 discord |
02:40:08 | FromDiscord | <KingDarBoja> Dudeee wtf |
02:40:10 | FromDiscord | <Elegant Beef> I have a "get focus" proc which will get the currently selected window and make it the active one |
02:40:19 | FromDiscord | <codic> @treeform Thanks! |
02:40:25 | FromDiscord | <codic> I'll look at that and see the diferences |
02:40:31 | Prestige | I was planning on tracking the previous window and selecting that one, manually |
02:40:36 | FromDiscord | <Elegant Beef> ie `screens[selected].workspaces[selectedWorkspace].rawWindow` will be active |
02:40:41 | FromDiscord | <Rika> > 100 discord |
02:40:41 | FromDiscord | <Rika> i'm also mod in a considerable amount of those servers xd |
02:40:55 | FromDiscord | <Gary M> Easy way to destroy Windows is still install a virus |
02:41:02 | FromDiscord | <KingDarBoja> I have Windows |
02:41:03 | FromDiscord | <KingDarBoja> 😄 |
02:41:03 | FromDiscord | <Gary M> Is to* |
02:41:19 | * | FromDiscord <KingDarBoja> JOIN US |
02:41:20 | FromDiscord | <Gary M> You can also destroy Windows by damaging the hard drive |
02:41:58 | FromDiscord | <KingDarBoja> Why my status isn't set to VSCode 😢 |
02:42:26 | FromDiscord | <KingDarBoja> nvm found it |
02:43:26 | FromDiscord | <codic> There's an easier way |
02:43:35 | FromDiscord | <codic> hold on |
02:43:57 | FromDiscord | <codic> Easy! |
02:44:10 | FromDiscord | <codic> Open cmd.exe or powershell and `DISKPART` |
02:44:10 | Prestige | Beef: How are you deciding which window is active if the active window is deleted, and an EnterNotify event isn't fired for another? |
02:44:28 | FromDiscord | <bedwardly-down> Prestige, if it’s calling after the window closes, that means it’s not actually destroying the window properly. |
02:44:31 | FromDiscord | <Elegant Beef> if the index isnt at a window i move it down |
02:44:36 | FromDiscord | <codic> type `list disk` when the prompt comes up. find your disk, then type `SELECT DISK 0` to select it. |
02:44:44 | FromDiscord | <codic> then type `clean` and restart. |
02:44:50 | Prestige | Ah ok, I was going to do something similar. Thanks |
02:44:56 | FromDiscord | <codic> you should not be able to boot unless you have a dualboot or live usb |
02:45:01 | FromDiscord | <codic> :) |
02:45:47 | Prestige | bedwardly: I'm explicitly calling it in order to close a window, it seems like the window still exists though.. or else XGetInputFocus wouldn't be returning the same ID of the window I tried to destroy |
02:45:50 | FromDiscord | <bedwardly-down> @Elegant Beef , are you caching the Windows to make it quicker for them to pop back up or what? |
02:46:08 | FromDiscord | <bedwardly-down> That’s what I’m saying. It shouldn’t be doing that |
02:46:18 | FromDiscord | <Elegant Beef> I mean i store the windows in workspaces |
02:46:19 | Prestige | Yeah, so I must need something else to destroy it |
02:46:31 | FromDiscord | <Elegant Beef> Those workspaces are then stored inside a screen |
02:46:49 | FromDiscord | <Elegant Beef> So i guess yes? |
02:47:03 | FromDiscord | <Elegant Beef> My workspaces arent setup x complaint since i didnt read anything about it |
02:47:08 | FromDiscord | <Elegant Beef> I just started making/moving windows |
02:47:15 | FromDiscord | <Elegant Beef> then learned about atoms and went, well damn |
02:47:43 | FromDiscord | <bedwardly-down> Why not write them to a session file that gets called when reopening specific windows? That’s how a small handful of other wms do it for the same effect |
02:48:23 | Prestige | Beef: Why do you use a client message w/atoms instead of just calling XDestroyEvent? I'm trying to figure out the proper way I should be doing this |
02:48:49 | FromDiscord | <bedwardly-down> That way the windows get destroyed but can be recreated with the same parameters |
02:48:51 | FromDiscord | <Elegant Beef> I do not like saving layouts |
02:48:58 | FromDiscord | <Elegant Beef> I like mathematical layouts |
02:49:12 | FromDiscord | <Elegant Beef> If i open a window i expect it to be added to the bottom of the stack |
02:49:22 | FromDiscord | <Elegant Beef> Unless it's a specific window meant to go to a specific workspace |
02:49:29 | FromDiscord | <bedwardly-down> Systems with shitty drivers could have some issues if they’re still running in the background |
02:49:44 | FromDiscord | <Elegant Beef> Prestige that was just off of something i read |
02:49:50 | FromDiscord | <Elegant Beef> Again i have 0 clue how to properly use xlib |
02:50:03 | FromDiscord | <Elegant Beef> i just stumble around since i am very bad about reading |
02:50:11 | FromDiscord | <Elegant Beef> I much prefer face ramming over reading docs |
02:50:27 | Prestige | I'll see if XDestroyWindow works better and let you know |
02:50:58 | FromDiscord | <bedwardly-down> I don’t really have specifically any direct clue either but know how trash Linux display drivers and memory management can be at times |
02:51:28 | FromDiscord | <Elegant Beef> On destroy notify you should remove the window and refocus if it was the focued window |
02:51:30 | FromDiscord | <Elegant Beef> That's what i do |
02:51:35 | FromDiscord | <Elegant Beef> Look at my OnDestroyWindow |
02:51:40 | FromDiscord | <Elegant Beef> I believe that handles it |
02:52:20 | Prestige | Cool, I'll take a look |
02:52:36 | FromDiscord | <codic> I have officially died. Nim is faster than c???? |
02:52:52 | Prestige | What? |
02:52:57 | FromDiscord | <codic> program in nim: |
02:52:58 | FromDiscord | <codic> Executed in 2.40 millis fish external |
02:52:58 | FromDiscord | <codic> usr time 2.38 millis 408.00 micros 1969.00 micros |
02:52:58 | FromDiscord | <codic> sys time 0.15 millis 154.00 micros 0.00 micros |
02:53:04 | FromDiscord | <codic> and in c: |
02:53:04 | FromDiscord | <codic> Executed in 2.40 millis fish external |
02:53:05 | FromDiscord | <codic> usr time 2.38 millis 408.00 micros 1969.00 micros |
02:53:05 | FromDiscord | <codic> sys time 0.15 millis 154.00 micros 0.00 micros |
02:53:10 | FromDiscord | <codic> wait what |
02:53:13 | FromDiscord | <Elegant Beef> Depends on use case |
02:53:13 | FromDiscord | <Elegant Beef> https://github.com/kostya/benchmarks |
02:53:17 | FromDiscord | <codic> I mean |
02:53:19 | FromDiscord | <codic> In nim: ________________________________________________________ |
02:53:19 | FromDiscord | <codic> Executed in 2.40 millis fish external |
02:53:19 | FromDiscord | <codic> usr time 2.38 millis 408.00 micros 1969.00 micros |
02:53:19 | FromDiscord | <codic> sys time 0.15 millis 154.00 micros 0.00 micros |
02:53:25 | FromDiscord | <codic> and in c |
02:53:25 | FromDiscord | <codic> ________________________________________________________ |
02:53:26 | FromDiscord | <codic> Executed in 3.77 millis fish external |
02:53:26 | FromDiscord | <codic> usr time 3.75 millis 421.00 micros 3.32 millis |
02:53:26 | FromDiscord | <codic> sys time 0.16 millis 160.00 micros 0.00 millis |
02:53:36 | FromDiscord | <Elegant Beef> In this benchmark nim is slower and more memory hungry than python |
02:53:39 | FromDiscord | <Elegant Beef> for json* |
02:53:46 | Prestige | I mean it compiles to C so it depends on how efficiently written it is, right? |
02:54:15 | shashlick | Python is written in C and has had years to optimize |
02:54:30 | FromDiscord | <bedwardly-down> @codic , are you using fish shell too? |
02:54:34 | FromDiscord | <Elegant Beef> It's only json where it really loses shashlick |
02:55:06 | * | zacharycarter quit (Ping timeout: 256 seconds) |
02:55:12 | FromDiscord | <codic> @bedwardly-down yeah |
02:55:13 | Prestige | Beef: I finished my first milestone for my wm last night. Have tags and a master/stack layout with gaps |
02:55:19 | FromDiscord | <Elegant Beef> nice |
02:55:28 | FromDiscord | <bedwardly-down> Fack yeah!!! |
02:55:32 | FromDiscord | <Elegant Beef> Mine is mostly functional minus a few things |
02:55:33 | Prestige | feelsgood |
02:56:06 | Prestige | Need to clean up focus behavior, and find out why launch dmenu gives my an invalid pointer error lol |
02:56:35 | FromDiscord | <codic> How do I get *one* C file from a nim program? |
02:56:38 | FromDiscord | <Elegant Beef> Yea i need to figure out how to be properly compliant |
02:56:47 | FromDiscord | <Elegant Beef> what do you mean one C file? |
02:57:01 | FromDiscord | <bedwardly-down> Fish may not be compatible with bash and other shells directly without some fiddling around, it’s definitely been my shell for like 5 years now |
02:57:01 | FromDiscord | <codic> Compile one nim program to one c program |
02:57:15 | FromDiscord | <codic> @bedwardly-down True haha, just switched a week or two ago |
02:57:32 | FromDiscord | <codic> there were some hitches at the beginning but i managed to port everything to fish |
02:57:43 | FromDiscord | <bedwardly-down> Have you started using the function capabilities yet? |
02:57:50 | FromDiscord | <codic> Yup |
02:58:06 | FromDiscord | <codic> I used them to define `!!` since i often used it in zsh |
02:58:16 | FromDiscord | <bedwardly-down> I haven’t fully ported everything yet but am slowly moving over. |
02:58:36 | FromDiscord | <bedwardly-down> Alias being released was a godsend |
02:58:49 | FromDiscord | <Gary M> Hey bed what's your ide |
02:59:05 | FromDiscord | <codic> Argh I'm tryna get c 😢 |
02:59:16 | FromDiscord | <Elegant Beef> he's going to say nvim |
02:59:18 | FromDiscord | <treeform> @codic I can always make nim faster. I like that about nim. |
02:59:20 | FromDiscord | <Elegant Beef> in 3..2...1 |
02:59:24 | FromDiscord | <bedwardly-down> Me? No ide. I go straight ed with some script wrangling additions added |
02:59:32 | FromDiscord | <Gary M> What |
02:59:38 | Prestige | nvim here |
02:59:41 | FromDiscord | <codic> lmao |
02:59:54 | FromDiscord | <codic> My nimcache with my project has |
02:59:55 | FromDiscord | <codic> ` hw.json '@mhw.nim.c' '@mhw.nim.c.o' stdlib_io.nim.c stdlib_io.nim.c.o stdlib_system.nim.c stdlib_system.nim.c.o |
02:59:55 | FromDiscord | <codic> ` |
03:00:00 | FromDiscord | <codic> Which one is the one I should be looking at |
03:00:05 | FromDiscord | <bedwardly-down> Ed and fish go hand in hand super well |
03:00:10 | FromDiscord | <codic> hahahaha |
03:00:38 | FromDiscord | <bedwardly-down> @Elegant Beef and @Gary M , did I catch you off guard? |
03:00:54 | FromDiscord | <Gary M> No I just don't know what that is |
03:00:59 | FromDiscord | <Elegant Beef> No i was close |
03:01:08 | FromDiscord | <bedwardly-down> Not close at all |
03:01:16 | FromDiscord | <Gary M> Probably super close |
03:01:41 | FromDiscord | <Elegant Beef> I mean close enough |
03:01:47 | FromDiscord | <Elegant Beef> TUI editor |
03:01:48 | FromDiscord | <bedwardly-down> Ed is what was built for computers that were made out of typewriters before screens appeared |
03:01:50 | FromDiscord | <Elegant Beef> Same thing to me |
03:02:04 | FromDiscord | <Gary M> Why are you masochistic |
03:02:37 | FromDiscord | <codic> .c |
03:02:45 | FromDiscord | <codic> file |
03:02:47 | FromDiscord | <codic> must |
03:02:48 | FromDiscord | <codic> be |
03:02:50 | FromDiscord | <codic> passed |
03:02:50 | FromDiscord | <codic> into |
03:02:52 | FromDiscord | <codic> codic@compiler |
03:02:56 | FromDiscord | <Gary M> Less spam please |
03:03:02 | FromDiscord | <codic> haha |
03:03:09 | FromDiscord | <bedwardly-down> I’m long term wanting to get good at server admin stuff and ed is almost guaranteed to be on all linux and older servers |
03:03:19 | FromDiscord | <codic> vi/vim |
03:03:29 | FromDiscord | <KingDarBoja> RIP IRC |
03:03:33 | FromDiscord | <Gary M> Rip |
03:03:46 | FromDiscord | <codic> I'ma just post this one more time and then go |
03:03:46 | FromDiscord | <codic> https://discordapp.com/channels/371759389889003530/371759389889003532/705614451919028224 |
03:03:47 | FromDiscord | <Gary M> Does irc reflect delete events or something |
03:03:49 | FromDiscord | <bedwardly-down> I’m a freak, @Gary M |
03:05:06 | FromDiscord | <codic> irc doesn't have deleting iir |
03:05:07 | FromDiscord | <codic> irc doesn't have deleting iirc |
03:07:00 | * | sentreen quit (Ping timeout: 256 seconds) |
03:07:31 | FromDiscord | <codic> *IRC* *IIRC* |
03:07:41 | FromDiscord | <codic> welp. no response 😢 |
03:08:19 | FromDiscord | <bedwardly-down> Rip ric |
03:09:15 | FromDiscord | <Zed> is there a way to make an array with an unditermined size? |
03:09:28 | FromDiscord | <Zed> actually that would be a sequence |
03:10:15 | FromDiscord | <Elegant Beef> yep arrays require a compiletime constant for the length |
03:11:16 | FromDiscord | <Elegant Beef> *Atleast that's what i understand, i have no clue why i speak* |
03:11:28 | FromDiscord | <codic> rip me |
03:11:34 | FromDiscord | <Zed> in compilation are sequences converted to arrays? |
03:11:39 | FromDiscord | <codic> I'ma just give this question another shot tommorow |
03:12:32 | FromDiscord | <Elegant Beef> I'd doubt it Zed, but againt i am a big ol' numpty |
03:15:04 | FromGitter | <bung87> no seq has store its size |
03:20:47 | * | sentreen joined #nim |
03:22:47 | FromDiscord | <Zed> How do you add a value to the sequence? |
03:22:55 | FromDiscord | <Zed> i cant find anything in the docs for it |
03:22:58 | FromDiscord | <bedwardly-down> Almost home. @Elegant Beef , I’ll see about getting nim setup and go from there |
03:23:39 | FromDiscord | <bedwardly-down> Doesn’t look like it would be hard to setup on my “arch btw” desktop. 😂 |
03:24:17 | FromDiscord | <bedwardly-down> Although, Artix > Arch. 🤪 |
03:24:44 | disruptek | zed: someseq.add somevalue |
03:25:11 | FromDiscord | <Zed> thanks disruptek |
03:25:39 | disruptek | seqs isn't something you're likely to find good documentation for; you kinda have to feel your way through it the first time. |
03:26:01 | disruptek | some shit you just can't learn from a book. |
03:26:22 | FromDiscord | <Elegant Beef> Yea you will need to compile cimgui for the imgui stuff and get the required libs for nimgl |
03:30:22 | FromDiscord | <Gary M> sequences are like C# lists or C++ vectors.... basically |
03:30:24 | FromDiscord | <bedwardly-down> Why use imgui, though? |
03:32:06 | FromDiscord | <bedwardly-down> I haven’t heard about that in forever but last time i saw it used, the devs were working to move away from it. It’s predominately for game development and used to be super finicky |
03:32:14 | FromDiscord | <bedwardly-down> I don’t know how it is now |
03:32:20 | FromDiscord | <Elegant Beef> I mean cause im silly |
03:32:26 | FromDiscord | <Gary M> sequences are also allocated on the heap and gc'd |
03:32:31 | FromDiscord | <Elegant Beef> Im using it for the status bar for no real reason |
03:32:46 | FromDiscord | <Elegant Beef> *I went hey this could work ok, let's do it, and i did it* |
03:32:49 | FromDiscord | <Gary M> bed what would you do instead |
03:33:25 | FromDiscord | <Gary M> and do you mean specifically dear imgui being finicky, or the concept of immediate mode gui's being finicky? |
03:33:56 | FromDiscord | <Gary M> because really they're simpler to get things done in a basic program loop |
03:35:52 | FromDiscord | <Gary M> https://games.greggman.com/game/imgui-future/ haven't read this through yet but it gives some good comparison |
03:36:45 | FromDiscord | <bedwardly-down> Imgui was messy about 5 years ago. I haven’t followed it since |
03:38:06 | FromDiscord | <Gary M> Still I'm not sure what you mean by messy |
03:39:22 | FromDiscord | <Gary M> Unless you're referring specifically to an imgui library like dear imgui. That's not clear lol |
03:40:37 | FromDiscord | <bedwardly-down> I honestly don’t know. I was a different person 5 years ago with different opinions only knowing of imgui through a random project |
03:41:36 | FromDiscord | <bedwardly-down> I’m pretty certain it was qgears, the dead Gears engine open source project to get Xenogears, ff7, 8 and 9 all running on everything |
03:41:57 | FromDiscord | <Gary M> Unity's gui used to be an imgui |
03:42:15 | FromDiscord | <bedwardly-down> http://q-gears.sourceforge.net/ |
03:42:30 | FromDiscord | <Gary M> Not a *dear imgui*, just an *immediate mode gui* |
03:42:36 | FromDiscord | <KingDarBoja> Guys I want to create a dictionary of heterogeneous values and string keys |
03:42:47 | FromDiscord | <KingDarBoja> But no idea, looking at the table modules examples |
03:43:34 | FromDiscord | <KingDarBoja> Let's say I want { "key1": int, "key2": seq[someType], "key3": Table[string,int] } |
03:45:26 | Prestige | Beef: If I invoke the same code you use in closeWindow and then call XDestroyWindow, looks like it is actually destroyed and I also don't receive a BadDrawable error |
03:45:51 | FromDiscord | <Gary M> Wow sourceforge that's still a thing |
03:46:07 | FromDiscord | <Gary M> @Elegant Beef |
03:47:07 | FromDiscord | <Elegant Beef> Uhh |
03:47:11 | FromDiscord | <Elegant Beef> Weird |
03:48:34 | FromDiscord | <bedwardly-down> Honestly, one flaw i have is I’m super out of the loop in tech with many different things. 😰 |
03:49:20 | FromDiscord | <bedwardly-down> Although, I’m always super on top of Linux issues that could make my pc use a nightmare at times. 🤪 |
03:50:24 | Prestige | bed: You don't really use ed, do you? |
03:52:45 | * | chemist69 quit (Ping timeout: 240 seconds) |
03:52:46 | FromDiscord | <KingDarBoja> _The main difference between Python dictionaries and Nim tables is that Nim is typed, so tables are homogeneous_ Scrap my question |
03:53:51 | * | chemist69 joined #nim |
03:56:35 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
03:56:56 | * | stefantalpalaru quit (Ping timeout: 272 seconds) |
04:01:31 | * | stefantalpalaru joined #nim |
04:02:18 | FromDiscord | <Rika> > Unity's gui used to be an imgui |
04:02:18 | FromDiscord | <Rika> you'd usually say imm.gui for that |
04:06:01 | * | supakeen quit (Quit: WeeChat 1.9.1) |
04:06:45 | * | supakeen joined #nim |
04:12:56 | * | rockcavera quit (Read error: Connection reset by peer) |
04:13:16 | * | rockcavera joined #nim |
04:16:33 | FromDiscord | <bedwardly-down> Prestige, https://youtu.be/JXdShuIjvbs |
04:17:01 | * | jwm224 quit (Ping timeout: 264 seconds) |
04:18:00 | * | jwm224 joined #nim |
04:25:35 | FromDiscord | <Elegant Beef> damn |
04:25:37 | FromDiscord | <Elegant Beef> Madlad |
04:28:40 | * | thomasross quit (Ping timeout: 246 seconds) |
04:29:05 | Prestige | bedwardly wow |
04:29:10 | Prestige | seems crazy tho tbh |
04:29:13 | * | d10n quit (Quit: why all the #hashtags #lol #hackers #overheard) |
04:29:56 | * | d10n joined #nim |
04:29:59 | * | d10n quit (Changing host) |
04:29:59 | * | d10n joined #nim |
04:41:25 | * | narimiran joined #nim |
04:42:02 | FromDiscord | <bedwardly-down> It’s not. ☺️ |
04:43:52 | Prestige | Why not use vim? |
04:48:02 | FromDiscord | <bedwardly-down> Honestly, I've been a Vim / Neovim user for a long time, so wanted a change and found it slowed me down a bit too much |
04:48:34 | Prestige | Huh, interesting |
04:49:08 | FromDiscord | <bedwardly-down> 🤷♂️ |
04:50:50 | FromDiscord | <Gary M> @Elegant Beef hey you basically did guess right just that he *used to* use vim/nvim |
04:51:16 | FromDiscord | <Gary M> I'll chalk that up as beef - 1 / bedwardly - 0 |
04:51:27 | FromDiscord | <Elegant Beef> Eh that's pretty common with linux users, especially those TWM users |
04:52:15 | FromDiscord | <Gary M> You would know that more than me |
04:52:33 | FromDiscord | <Gary M> The only thing I know about Linux users is that they'll tell you they're Linux users without you asking |
04:53:29 | FromDiscord | <bedwardly-down> Often, there's a legit reason for that. You want us to try something out and we either can't or won't because you didn't support us. 😛 |
04:54:05 | FromDiscord | <Gary M> |
04:54:05 | FromDiscord | <Gary M> https://cdn.discordapp.com/attachments/371759389889003532/705643181185695754/u8wa9kyh8jjy.jpg |
04:54:06 | FromDiscord | <Elegant Beef> Gotta make comments about how linux is a better designed developer environment wherever possible |
04:54:32 | FromDiscord | <bedwardly-down> It's not always better but does require a certain kind of madman. 😛 |
04:55:09 | FromDiscord | <Elegant Beef> I mean for developers i'd say it's clearly better |
04:55:47 | FromDiscord | <bedwardly-down> Honestly, if Tristan or Beef here hadn't pointed it out, I wouldn't have really said I was a Linux dev as long as possible in GDL. |
04:56:00 | FromDiscord | <Elegant Beef> lol |
04:56:02 | FromDiscord | <Elegant Beef> *Sorry* 😄 |
04:56:39 | FromDiscord | <bedwardly-down> Also, nim is available in the Artix main repositories? Nice |
04:58:39 | FromDiscord | <Elegant Beef> I mean i say use choosenim always |
04:58:43 | FromDiscord | <Elegant Beef> Choosenim makes life great |
05:01:21 | FromDiscord | <bedwardly-down> *too lazy and tired to struggle with extra hard downloading of libraries* |
05:01:23 | FromDiscord | <bedwardly-down> 😛 |
05:01:31 | Prestige | Beef: I agree about Linux being a better dev env |
05:01:41 | * | rockcavera quit (Remote host closed the connection) |
05:01:49 | FromDiscord | <Gary M> choosenim is easy |
05:03:48 | FromDiscord | <bedwardly-down> Yeah, it's pretty easy. And adding it to my fish path is much easier than with Bash |
05:06:36 | FromDiscord | <bedwardly-down> Linux is definitely a better environment if you're willing to learn it as such. Right off the bat, it's not going to make a lick of sense to many people |
05:10:27 | FromDiscord | <bedwardly-down> But, also, the whole argument is fully subjective and a matter of opinion. I will never go out and tell people to ditch Windows or Mac for a Linux system but will help some if they want to get into it |
05:10:53 | FromDiscord | <Gary M> I will tell people to not get mac tho 😄 |
05:11:14 | FromDiscord | <bedwardly-down> Hey, I loved the Mac I had years back. They have their benefits |
05:11:27 | FromDiscord | <Gary M> I don't see any benefits in 2020 |
05:11:40 | FromDiscord | <Gary M> especially for game dev which is usually where my discussions are lol |
05:11:48 | FromDiscord | <bedwardly-down> Why I have an Iphone and Android phone at same time |
05:11:54 | Prestige | Idk how anyone uses macs nowadays |
05:11:57 | FromDiscord | <Gary M> mac isn't ios though |
05:12:01 | FromDiscord | <bedwardly-down> That and tax write off for work |
05:12:21 | FromDiscord | <bedwardly-down> It's not, but Macs are still decent for Unix users especially |
05:12:39 | FromDiscord | <Gary M> then get a Unix compatible system for MUCH less $$$ |
05:12:54 | FromDiscord | <bedwardly-down> That's pretty much all systems |
05:13:00 | FromDiscord | <Gary M> exactly |
05:13:08 | FromDiscord | <bedwardly-down> FreeBSD should run on most hardware |
05:13:16 | FromDiscord | <Gary M> so why is mac decent when it costs more |
05:13:19 | FromDiscord | <bedwardly-down> And Linux will run on most hardware |
05:14:36 | FromDiscord | <Rika> #offtopic (#nim-offtopic for irc) |
05:14:43 | FromDiscord | <Gary M> 👀 |
05:15:14 | FromDiscord | <Gary M> cast[on-topic](off-topic) |
05:15:23 | FromDiscord | <bedwardly-down> I was starting with nim and they dragged me into the badlands. I'm a good boy, I swear |
05:15:26 | Prestige | Nice |
05:15:50 | FromDiscord | <Rika> :Doubt: |
05:17:05 | FromDiscord | <Rika> TIL nimble used to be called babel? |
05:18:17 | FromDiscord | <bedwardly-down> If that's the case, I can see that being an issue. There are multiple projects / libraries that have gone by that |
05:30:42 | FromDiscord | <bedwardly-down> Choosenim, really? `Choose a job. Choose a mortgage. Choose life. Choose Nim.` |
05:33:38 | FromDiscord | <Rika> pff |
05:34:53 | FromDiscord | <bedwardly-down> @Elegant Beef, are you working on devel or stable? |
05:35:09 | FromDiscord | <Elegant Beef> #head |
05:36:30 | FromDiscord | <bedwardly-down> Nim's actual download TUI stuff is really poor... |
05:37:37 | FromDiscord | <bedwardly-down> You know what, I'm getting grumpy |
05:40:17 | Prestige | Beef if you happen to look into dmenu launch in your wm, lmk if u find anything? I'll do the same |
05:40:26 | Prestige | just have a few things to finish up before I get there |
05:41:12 | FromDiscord | <bedwardly-down> Dmenu isn't too bad. It does require a bit of configuration work, especially if you're not using bash or a bash compatible shell |
05:41:45 | Prestige | I use it a lot, but for some reason in the wm I'm making, I get an error when trying to open it |
05:41:47 | FromDiscord | <bedwardly-down> I've got it on on my system and it does the job |
05:41:53 | Prestige | Haven't look into fixing it at all, yet |
05:42:01 | FromDiscord | <Elegant Beef> I use rofi |
05:42:04 | FromDiscord | <Elegant Beef> So i have rofi support |
05:42:30 | FromDiscord | <bedwardly-down> Prestige, what shell are you using and anything funky on the backend like XWayland or anything |
05:42:40 | Prestige | zsh, and nah |
05:43:04 | Prestige | rofi felt a bit slow to me, so I switched back to dmenu |
05:43:09 | FromDiscord | <bedwardly-down> I tried zsh the other day and spent two hours noping back into fish, so I don't know |
05:43:30 | Prestige | I had to add a few extensions to make zsh usable |
05:43:32 | FromDiscord | <Yardanico> @Rika because Nim was called Nimrod |
05:43:36 | Prestige | havent tried fish in ~10 yrs |
05:44:00 | FromDiscord | <Yardanico> "Nimrod (/ˈnɪmrɒd/;[1] Hebrew: נִמְרוֹדֿ, Modern: Nimrôd, Tiberian: Nimrôḏ; Aramaic: ܢܡܪܘܕ; Arabic: اَلنّمْرُود, romanized: an-Namrūd; Persian: نمرود, romanized: Namrud; Turkish: Nemrud), a biblical figure described as a king in the land of Shinar (Mesopotamia), was, according to the Book of Genesis and Books of Chronicles, the son of Cush, the grandson of Ham and g |
05:44:01 | FromDiscord | <bedwardly-down> Rofi felt the same for me and I didn't like the default configuration when dmenu was already working how I needed |
05:44:08 | FromDiscord | <Yardanico> Tower of Babel |
05:44:35 | FromDiscord | <Yardanico> It's references all the way down |
05:44:39 | FromDiscord | <Rika> hey i didnt question why it was called babel |
05:44:45 | FromDiscord | <bedwardly-down> Also, before anyone says anything, this discussion is about a nim based wm. 😄 |
05:45:00 | FromDiscord | <Yardanico> I use Sway with Wofi and Waybar |
05:45:26 | FromDiscord | <Elegant Beef> Im currently using awesomewm but was using i3wm before |
05:45:30 | Prestige | I'm planning on making the wm minimal, no bar or deps for a menu |
05:45:32 | FromDiscord | <Elegant Beef> I really just want alternating split |
05:45:34 | FromDiscord | <bedwardly-down> You using Wayland then? How's it working with your system? My drivers are whack with it |
05:45:56 | Prestige | I keep hearing about issues with Wayland so I haven't even tried it :/ |
05:46:03 | FromDiscord | <Yardanico> I have full AMD system |
05:46:10 | Prestige | but if it becomes standard I'll port my wm to it |
05:46:12 | FromDiscord | <Yardanico> So of course Wayland works just fine |
05:46:22 | FromDiscord | <Yardanico> RX 570 + 3700X, I don't game much |
05:46:58 | FromDiscord | <bedwardly-down> Prestige, it won't be the full standard for a good while still due to driver complications and massive amounts of code work needed to get everything to move from X to Wayland |
05:47:39 | Prestige | im honestly expecting 15 yrs (if it becomes standard) |
05:48:12 | FromDiscord | <Yardanico> Well it already works quite well for a lot of stuff |
05:48:31 | FromDiscord | <Yardanico> For most applications it's a matter of updating the framework version they're using |
05:48:41 | FromDiscord | <Yardanico> Almost no applications use X directly nowadays |
05:48:53 | FromDiscord | <Yardanico> They use GTK, Qt, etc |
05:48:59 | FromDiscord | <bedwardly-down> True that. |
05:49:00 | Prestige | True |
05:49:07 | Prestige | Okay maybe sooner then |
05:49:08 | FromDiscord | <Yardanico> Also there's offtopic channel :) |
05:49:36 | Prestige | We were indirectly talking about nim, I'm making a WM with x11 |
05:59:37 | FromDiscord | <bedwardly-down> @Elegant Beef how do I install head with choosenim? I'm usually decent with this stuff but I'm missing something |
06:00:07 | FromDiscord | <Elegant Beef> `choosenim '#head'` |
06:03:24 | FromDiscord | <bedwardly-down> Not putting in single quotes is why I couldn't get it to work? O.o |
06:03:34 | FromDiscord | <Elegant Beef> yes |
06:03:50 | FromDiscord | <Elegant Beef> Idk it's what i have to do with my terminal |
06:03:57 | FromDiscord | <Elegant Beef> So could just be bash i guess 😄 |
06:04:24 | FromDiscord | <bedwardly-down> Makes sense. I'm on fish, and # isn't usually a thing for terminal commands |
06:04:42 | * | solitudesf- joined #nim |
06:04:49 | FromDiscord | <Yardanico> @Elegant Beef no? |
06:04:54 | FromDiscord | <Yardanico> That's not how you do it |
06:05:06 | FromDiscord | <Yardanico> choosenim devel |
06:05:33 | FromDiscord | <Yardanico> Ah I see |
06:05:36 | FromDiscord | <Elegant Beef> I dont recall where i seen to do this but i know someone told me |
06:05:39 | FromDiscord | <Yardanico> Both will work |
06:05:48 | FromDiscord | <bedwardly-down> Naw. Choosenim devel got nightly but not master at head |
06:05:59 | FromDiscord | <bedwardly-down> At least that's what it showed on my end |
06:06:38 | FromDiscord | <Elegant Beef> Yea idk im a numpty |
06:06:42 | FromDiscord | <Elegant Beef> So no one should ever listen to me |
06:07:03 | FromDiscord | <Yardanico> Well Beef you're right |
06:07:12 | FromDiscord | <Never Listen To Beef> There a name to match my actual position here |
06:07:21 | FromDiscord | <Yardanico> I'm just a bit old styled so I have nim repo cloned |
06:07:35 | FromDiscord | <Yardanico> And do "sh build_all.sh" every so often |
06:07:41 | FromDiscord | <Yardanico> After git pull |
06:07:48 | FromDiscord | <Never Listen To Beef> ah |
06:08:02 | FromDiscord | <Yardanico> I remember the times when we didn't have build_all.sh :P |
06:08:06 | FromDiscord | <bedwardly-down> I usually would but I'm lazy and tired right now. Also, you could put it on a daily cron job if you wanna get fancy |
06:08:20 | FromDiscord | <Yardanico> I don't really run cron :P |
06:08:51 | FromDiscord | <bedwardly-down> I run it on my server but not on my laptop right now. No need for it 😛 |
06:21:38 | * | ftsf joined #nim |
06:28:39 | FromDiscord | <Zed> why does `for i in tape` not work but `for i in 0..tape.len` work, tape is a string |
06:29:15 | FromDiscord | <Zed> doesnt the first option do the same thing? |
06:30:43 | FromDiscord | <Never Listen To Beef> is tape a sequence? |
06:31:06 | FromDiscord | <Never Listen To Beef> the latter works cause it creates a range from 0 to tape.len |
06:31:15 | FromDiscord | <Never Listen To Beef> then it iterates over them |
06:31:16 | FromDiscord | <Zed> tape is a string |
06:31:34 | FromDiscord | <Rika> Are you sure the latter doesn't work |
06:31:38 | FromDiscord | <Zed> aren't strings natievly arrays? |
06:31:45 | FromDiscord | <Zed> yeah i was getting errors |
06:31:52 | FromDiscord | <Never Listen To Beef> you mean former rika |
06:32:20 | FromDiscord | <Never Listen To Beef> It works |
06:32:20 | FromDiscord | <Never Listen To Beef> https://play.nim-lang.org/#ix=2kgs |
06:32:22 | FromDiscord | <Rika> I've been awake for so long |
06:32:28 | FromDiscord | <Rika> You think I can think?? |
06:32:50 | FromDiscord | <Rika> !eval for i in "test": echo i |
06:32:53 | NimBot | t↵e↵s↵t |
06:33:11 | FromDiscord | <Rika> Works here too |
06:34:01 | FromDiscord | <Zed> https://play.nim-lang.org/#ix=2kgs |
06:34:01 | FromDiscord | <Zed> this is not working on the playground |
06:34:01 | FromDiscord | <Rika> What error are you exactly getting |
06:34:17 | FromDiscord | <Zed> type mismatch |
06:34:25 | FromDiscord | <Rika> It just did for me |
06:34:30 | FromDiscord | <Zed> proc `[]`(s: string; i: BackwardsIndex): char |
06:34:30 | FromDiscord | <Zed> first type mismatch at position: 0 |
06:34:30 | FromDiscord | <Zed> proc `[]`[I: Ordinal; T](a: T; i: I): T |
06:34:30 | FromDiscord | <Zed> first type mismatch at position: 0 |
06:34:30 | FromDiscord | <Zed> proc `[]`[Idx, T, U, V](a: array[Idx, T]; x: HSlice[U, V]): seq[T] |
06:34:30 | FromDiscord | <Zed> first type mismatch at position: 0 |
06:34:32 | FromDiscord | <Zed> proc `[]`[Idx, T](a: array[Idx, T]; i: BackwardsIndex): T |
06:34:34 | FromDiscord | <Zed> first type mismatch at position: 0 |
06:34:36 | FromDiscord | <Zed> proc `[]`[Idx, T](a: var array[Idx, T]; i: BackwardsIndex): var T |
06:34:37 | FromDiscord | <Zed> first type mismatch at position: 0 |
06:34:39 | FromDiscord | <Zed> proc `[]`[T, U, V](s: openArray[T]; x: HSlice[U, V]): seq[T] |
06:34:41 | FromDiscord | <Zed> first type mismatch at position: 0 |
06:34:42 | FromDiscord | <Zed> proc `[]`[T, U](s: string; x: HSlice[T, U]): string |
06:34:44 | FromDiscord | <Zed> first type mismatch at position: 0 |
06:34:46 | FromDiscord | <Zed> proc `[]`[T](s: openArray[T]; i: BackwardsIndex): T |
06:34:47 | FromDiscord | <Zed> first type mismatch at position: 0 |
06:34:48 | narimiran | yaaay, multiline paste |
06:34:49 | FromDiscord | <Zed> proc `[]`[T](s: var openArray[T]; i: BackwardsIndex): var T |
06:34:51 | FromDiscord | <Zed> first type mismatch at position: 0 |
06:34:52 | FromDiscord | <Zed> template `[]`(s: string; i: int): char |
06:34:54 | FromDiscord | <Zed> first type mismatch at position: 0 |
06:34:55 | FromDiscord | <Zed> |
06:34:56 | FromDiscord | <Zed> expression: [](tape, i) |
06:34:58 | FromDiscord | <Zed> that is in the playground |
06:34:59 | FromDiscord | <Rika> |
06:35:01 | FromDiscord | <Rika> https://cdn.discordapp.com/attachments/371759389889003532/705668559388540988/Screenshot_20200501-153445.jpg |
06:35:03 | FromDiscord | <Zed> is it all messed up? |
06:35:24 | FromDiscord | <Zed> im an idiot |
06:35:33 | FromDiscord | <Zed> i was trying to use i as an index |
06:35:57 | FromDiscord | <Zed> god im a dumbasss |
06:35:57 | FromDiscord | <Never Listen To Beef> I had seen that as an issue with that acessor |
06:36:09 | FromDiscord | <Rika> Name your variables more explicitly |
06:36:12 | FromDiscord | <Never Listen To Beef> Rather operator error |
06:36:26 | FromDiscord | <Rika> Literally make single letter variables an error for you |
06:44:03 | * | silvernode joined #nim |
06:46:23 | FromDiscord | <Yardanico> Also by the way guys |
06:46:43 | FromDiscord | <Yardanico> Did you know that Nim discord server actually has an audio channel which has never been used (afaik) |
06:48:38 | FromDiscord | <Zed> lol i just noticed that now you've pointed it out |
06:53:06 | FromGitter | <bung87> do I need packaging portable application as installer so application can have app icon? on Linux |
06:53:25 | FromDiscord | <Yardanico> On Linux your app doesn't really ship an icon in the binary |
06:54:05 | FromDiscord | <Yardanico> On Linux it needs to be in a separate file which will be referenced in the .desktop file (which is a file format for application shortcuts on Linux) |
06:54:12 | FromGitter | <bung87> yeah , it has entry file |
06:55:11 | FromGitter | <bung87> without install step that .desktop cant specify the application path. |
06:57:34 | * | silvernode quit (Ping timeout: 260 seconds) |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:00:33 | skrylar[m] | fish certainly does not run other shell scripts. they are entirely their own. although fish is *usually* nicer. simple "rename stuff while replacing extension" is verbose tho :| |
07:04:03 | * | sz0 joined #nim |
07:04:45 | * | gmpreussner joined #nim |
07:05:50 | FromGitter | <bung87> @skrylar another topic? |
07:09:11 | skrylar[m] | i saw fish mentioned in the backlog |
07:09:31 | FromGitter | <bung87> OK |
07:10:05 | FromGitter | <bung87> maybe I'll try `snapcraft ` for packaging |
07:10:23 | skrylar[m] | appimages are pretty nice |
07:11:05 | skrylar[m] | i always wished appimage took off more than it did; they're simple and they mirror the old macos "just download this app, plop it in Apps and run it" user story. snap/flat ... well, they don't. |
07:12:20 | FromDiscord | <Never Listen To Beef> I'd be happy with appimages if there was a repo like system for them and they linked into `bin` |
07:12:44 | FromGitter | <bung87> ok , I will consider it, I only left the linux app build step now, for mac ,win I already wrote scripts. |
07:14:06 | skrylar[m] | nothing stops you from putting the appimage in bin. they are just elf stubs with a squashfs image taped on |
07:14:08 | FromGitter | <bung87> mac is .app dir + plist, win just embed ico to exe, that's easier than linux |
07:14:20 | FromDiscord | <Zed> how could i read in output as input from a shell executed command? |
07:14:36 | FromDiscord | <Zed> if that mkes sense |
07:14:41 | FromDiscord | <Never Listen To Beef> Nothing stops it but i use a package manager so i dont have to do manual work 😄 |
07:14:56 | skrylar[m] | foo | bar? |
07:15:16 | FromGitter | <bung87> @zed it make sense, it's about stdio pipline |
07:15:26 | skrylar[m] | or do you mean capturing stdout when running another process |
07:15:49 | FromDiscord | <Zed> the latter i think |
07:17:06 | FromDiscord | <Zed> i want to execute an executable from nim and read what it outputs to the console |
07:17:56 | FromGitter | <bung87> you can easy found article about this in python ,nodejs |
07:24:22 | Araq | Zed: look into osproc.nim |
07:25:44 | * | cyraxjoe quit (Quit: No Ping reply in 180 seconds.) |
07:25:54 | * | cyraxjoe joined #nim |
07:27:24 | * | couven92 joined #nim |
07:33:01 | * | ryan_ joined #nim |
07:35:37 | * | Tangor quit (Ping timeout: 264 seconds) |
07:39:27 | * | ryan_ is now known as tlanger |
07:49:45 | * | dddddd joined #nim |
08:00:02 | Araq | federico3, https://forum.nim-lang.org/t/6277 please have a look |
08:00:21 | Araq | it's & inside a title when it should be & |
08:00:56 | Araq | insert rant about "everything should be text (so that we end up with crazing quoting and escaping rules everywhere)" here |
08:01:10 | Araq | *crazy |
08:04:06 | * | tane joined #nim |
08:08:45 | * | ftsf quit (Ping timeout: 240 seconds) |
08:54:20 | * | Vladar joined #nim |
09:15:15 | * | couven92 quit (Read error: Connection reset by peer) |
09:15:40 | * | couven92 joined #nim |
09:18:48 | * | tane quit (Quit: Leaving) |
09:18:49 | * | solitudesf- quit (Ping timeout: 264 seconds) |
09:20:30 | * | sagax quit (Read error: Connection reset by peer) |
09:32:51 | * | Trustable joined #nim |
09:36:19 | * | sagax joined #nim |
09:37:08 | FromDiscord | <Yardanico> @Araq also by the way, is there a way to make arc work with os:standalone, for example for nimkernel? |
09:38:08 | FromDiscord | <Yardanico> Last time I tried I got an error "system module needs: nimErrorFlag" because if os:standalone, system module includes system/embedded which doesn't contain that |
09:41:23 | FromGitter | <pigmej> Heya |
09:42:17 | FromGitter | <pigmej> Anyone have idea how to fix `CANNOT LINK EXECUTABLE "./hello": library "libc++_shared.so" not found` on Android? That's how it was compilled: https://gist.github.com/pigmej/4d52250b65c9d4c4d5cee3dcefb80b74 + dockcross with android-arm64 |
09:50:40 | Araq | yardanico: use --os:any --gc:arc for kernel development |
09:52:45 | * | couven92 quit (Read error: Connection reset by peer) |
09:53:12 | * | couven92 joined #nim |
10:06:54 | FromGitter | <pigmej> ok the solution is to add `-static-libstdc++` to the scripts |
10:22:30 | FromGitter | <pigmej> now `could not load: libpcre.so(.3|.1|)` hmm |
10:22:43 | Yardanico | you need pcre for nim's "re" and "nre" modules to work |
10:23:07 | FromGitter | <pigmej> yeah the question how to ship it to ndk... |
10:23:29 | dom96 | this is why I avoid dependencies at all costs |
10:23:35 | Yardanico | try https://github.com/genotrance/nimpcre |
10:23:36 | dom96 | you may have better luck using nim-regex |
10:23:51 | * | solitudesf joined #nim |
10:23:51 | dom96 | (regex implemented in Nim) |
10:24:05 | dom96 | or just not use regex at all :) |
10:24:24 | FromGitter | <pigmej> sadly I have to for that binary ;) |
10:24:38 | FromGitter | <pigmej> @Yardanico will check maybe that will help |
10:27:08 | FromGitter | <Bennyelg> I want to return a list of students data ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ Since I have seq of JsonNode Im getting the @ thing [https://gitter.im/nim-lang/Nim?at=5eabf97b22f9c45c2a624eae] |
10:27:12 | FromGitter | <Bennyelg> how do I get rid of it |
10:27:33 | FromGitter | <Yardanico> wdym "get rid of it"? where is that string from? |
10:28:15 | * | jwm224 quit (Ping timeout: 240 seconds) |
10:28:54 | FromGitter | <Bennyelg> its list of strings |
10:28:59 | FromGitter | <Bennyelg> as you can see or JsonNode |
10:29:01 | FromGitter | <Bennyelg> for that matter |
10:29:29 | FromGitter | <Bennyelg> Managed doing this: $(%*{"Students": studentsJsons}) |
10:33:48 | FromGitter | <pigmej> crap |
10:33:51 | FromGitter | <pigmej> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5eabfb0f7975db7ebfd9c040] |
10:33:57 | FromGitter | <pigmej> will have to dig deeper ;/ |
10:34:17 | FromGitter | <Yardanico> are you sure you read the readme correctly? |
10:36:31 | Yardanico | I think I'm close to compiling JackOS (seems to be a fork of nimkernel with some code updated) with arc and --os:any |
10:37:10 | Yardanico | had to do a few quick one or two-line changes in some files like excpt.nim or mmdisp.nim, also had to discover flags like nimNoLibc, StandaloneHeapSize, noSignalHandler |
10:37:46 | Yardanico | now it fails on the linking step because for some reason it can't find nim procs defined (and declared) in one c file and used in another c file |
10:40:34 | FromGitter | <pigmej> @Yardanico yeah I have set `-d:usePcreHeader` |
10:41:14 | * | jwm224 joined #nim |
10:47:11 | * | Ven`` joined #nim |
10:48:17 | Yardanico | huh seems like all symbols are defined with ".hidden" because of PRs which made all symbols private :P |
10:49:58 | FromGitter | <pigmej> ;D |
10:50:17 | Yardanico | pigmej I honestly don't know much about pcre, you can try https://github.com/nitely/nim-regex |
10:50:25 | Yardanico | it's a pure-nim regex lib, mostly compatible with pcre with a few exceptions |
10:50:34 | Yardanico | https://nitely.github.io/nim-regex/regex.html for docs |
10:57:50 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
11:09:16 | Yardanico | well at last I managed to do it |
11:09:49 | * | NimBot joined #nim |
11:13:18 | * | dadada quit (Ping timeout: 260 seconds) |
11:13:54 | Yardanico | although seems like not really, it seems to crash when trying to do stuff with strings, maybe I didn't fix undefined references properly |
11:14:35 | * | dadada joined #nim |
11:14:59 | * | dadada is now known as Guest13622 |
11:16:24 | * | xcm quit (Remote host closed the connection) |
11:18:27 | * | xcm joined #nim |
11:24:43 | * | rockcavera joined #nim |
11:24:56 | * | lritter joined #nim |
11:30:34 | federico3 | Araq: thanks. Unfortunately we don't seem to have html escaping in stdlib or jester... |
11:31:03 | * | letto quit (Quit: Konversation terminated!) |
11:38:56 | * | Ven`` joined #nim |
11:44:16 | * | Guest13622 quit (Remote host closed the connection) |
11:46:23 | Yardanico | seems like it crashes on var c = @[1, 2, 3], hmmm |
11:46:26 | Yardanico | now how do I debug a kernel :DD |
11:46:50 | Yardanico | at least I god COM1 hooked up so I can use good ol' echo debugging, although the kernel is a bit more unforgiving |
11:57:02 | FromDiscord | <bedwardly-down> What’s this about the kernel? I’d be intrigued on what you figure out with it |
11:57:31 | Yardanico | https://github.com/watzon/JackOS is a fork of https://github.com/dom96/nimkernel and I'm trying to make it work with --os:any and --gc:arc |
11:57:41 | Yardanico | so you could have strings and sequences and ref types in the kernel :DDDD |
11:57:53 | FromDiscord | <bedwardly-down> 👀 |
11:57:54 | Yardanico | managed by a not-so-much-a-GC |
11:58:17 | FromDiscord | <Recruit_main707> if its a kernel, why os:any? |
11:58:17 | * | liblq-dev joined #nim |
11:58:42 | Yardanico | because os:any is better to use than os:standalone for most cases |
11:58:43 | Yardanico | including kernel |
11:59:09 | Yardanico | wow so I actually can catch exceptions in kernel code |
11:59:12 | * | letto joined #nim |
11:59:12 | Yardanico | that works |
11:59:25 | Yardanico | albeit that worked without gc:arc with nimkerne ltoo |
11:59:40 | FromDiscord | <Recruit_main707> and they say rust is the best for embeded devices |
12:00:07 | Yardanico | good luck porting LLVM to your obscure microcontroller which only has some GCC cross-compile toolchain from 2015 ;) |
12:00:18 | FromDiscord | <bedwardly-down> Would test building it with clang have value to your endeavors? |
12:00:39 | Yardanico | honestly I'm not experienced in osdev at all, I'm just tinkering around trying to glue things together :D |
12:00:51 | Yardanico | there's https://wiki.osdev.org/LLVM_Cross-Compiler |
12:00:55 | Yardanico | and maybe I should try clang |
12:02:06 | FromDiscord | <bedwardly-down> Oh, definitely. There's also this if you wanna try to cross compile for Windows: https://github.com/mstorsjo/llvm-mingw |
12:02:20 | FromDiscord | <bedwardly-down> Despite it not being useful in kernel development, who knows |
12:03:13 | * | solitudesf quit (Ping timeout: 264 seconds) |
12:03:33 | * | solitudesf joined #nim |
12:03:34 | FromDiscord | <bedwardly-down> Also, is this only specific to 32 bit or has anyone tried to compile for a 64 bit arch? |
12:03:40 | Yardanico | nimkernel is 32-bit only |
12:03:51 | Yardanico | 64-bit is a bit more complicated |
12:03:52 | Yardanico | https://wiki.osdev.org/Creating_a_64-bit_kernel |
12:03:54 | FromDiscord | <bedwardly-down> Thanks. reading the config file |
12:04:00 | Yardanico | well not that much really |
12:04:40 | FromDiscord | <bedwardly-down> I'm assuming that nimkernel's main focus was embedded systems and whatnot? |
12:04:51 | Yardanico | it was to show that nim can be used to create a kernel :) |
12:05:21 | FromDiscord | <bedwardly-down> Nice. Let me drag another person in here because I think he would get a kick out of this. Brb |
12:06:02 | * | supakeen quit (Quit: WeeChat 1.9.1) |
12:06:42 | * | supakeen joined #nim |
12:09:28 | FromDiscord | <bedwardly-down> Time to RTFM. I'm getting make errors right of the bat about non existent thing a ma bobs |
12:09:41 | Yardanico | well I don't think you'll be able to build JackOS as-is |
12:09:52 | Yardanico | it for some reason has --gc:arc in nim.cfg but it doesn't really work with that |
12:10:49 | FromDiscord | <bedwardly-down> Sweet. The original dev was on Arch Linux, so we know it at lwast was tested on something sane. /s 😛 |
12:12:04 | FromDiscord | <bedwardly-down> Is #offtopic not tied to the gitter also? |
12:12:09 | Yardanico | it is tied |
12:12:39 | FromDiscord | <bedwardly-down> Gotya |
12:15:41 | * | abm joined #nim |
12:16:39 | FromDiscord | <bedwardly-down> What version of nim are you running? I'm about to hop on stable. The compiler is telling me that nimerrormodule is missing |
12:16:51 | Yardanico | yeah as I said JackOS doesn't really compile with --gc:arc |
12:16:58 | Yardanico | you need --os:any to compile with --gc:arc |
12:17:00 | Yardanico | (at least) |
12:17:07 | Yardanico | and in JackOS you need to change more things |
12:17:21 | Yardanico | I kinda fixed it but the kernel simply crashes when I try to create a seq, I already created a fork though |
12:17:36 | FromDiscord | <bedwardly-down> Gotya. Your username the same? |
12:17:39 | Yardanico | yes |
12:17:53 | Yardanico | but you also need to patch some stuff in nim system module files :P |
12:18:27 | FromDiscord | <bedwardly-down> Fuuuuuu... I mean, I need coffee. Bring it on!!!! |
12:19:01 | FromDiscord | <bedwardly-down> And easy enough, you are the only fork of it period |
12:19:27 | FromDiscord | <bedwardly-down> So, now I fork thee. 😛 |
12:21:34 | FromDiscord | <bedwardly-down> Why is i686-elf-gcc being used? |
12:21:53 | Yardanico | because it's a cross-compiler for 32-bit freestanding |
12:21:59 | Yardanico | hence no "gnu" in name |
12:22:50 | FromDiscord | <bedwardly-down> Ah. I thought Santa was in the house, yo |
12:23:48 | FromDiscord | <bedwardly-down> I always thought elf was primarily for embedded systems. Interesting |
12:24:19 | FromDiscord | <bedwardly-down> That's also the bare amount I've done cross-compiling for and that was way too long ago |
12:27:51 | FromDiscord | <bedwardly-down> I'm about to start seeing about setting up an i686-elf-clang compiler to see what that says. Clang usually has better error messages for these kinds of things |
12:28:20 | Yardanico | well I don't really know now :) |
12:28:26 | Yardanico | but I pushed a new commit with some notes |
12:28:43 | FromDiscord | <bedwardly-down> Checking into that |
12:29:02 | * | rockcavera quit (Remote host closed the connection) |
12:29:56 | FromDiscord | <bedwardly-down> *honestly doesn't want to use aur for getting the cross-compiler setup if he can avoid it* AUR isn't the worst thing but I don't like it when it breaks my system. Ha |
12:30:14 | FromDiscord | <bedwardly-down> Think Arch version of Ubuntu |
12:30:23 | Yardanico | you don't need aur |
12:30:39 | Yardanico | ah right you do |
12:30:40 | FromDiscord | <bedwardly-down> You build from source? |
12:31:02 | Yardanico | actually nvm |
12:31:14 | Yardanico | if you don't want to build from source, you can add chaotic-aur unofficial arch repo |
12:31:18 | Yardanico | i686-elf-gcc is there |
12:31:43 | FromDiscord | <bedwardly-down> I'll build from source. 😛 |
12:32:22 | FromDiscord | <bedwardly-down> Building isn't hard. It's just usually a bit more time consuming. 😄 |
12:32:24 | * | tane joined #nim |
12:33:35 | FromDiscord | <bedwardly-down> So, is gcc hardcoded into JackOS or would I be able to just change that? |
12:33:58 | FromDiscord | <bedwardly-down> Also, those notes are good. |
12:34:12 | FromDiscord | <bedwardly-down> Actually, really good. 😄 |
12:34:51 | Yardanico | well they all can be fixed with PRs to Nim itself, although they need to be done more properly |
12:36:09 | FromDiscord | <bedwardly-down> But there's no real point in them right now until you can actually justify them with building this. That sound about right? |
12:36:17 | Yardanico | yeah |
12:36:22 | Yardanico | kinda :P |
12:40:34 | FromGitter | <bung87> is there alternative `windres` on macos? |
12:40:58 | Yardanico | you want to have a macos app with icon? |
12:41:03 | Yardanico | then you'll have to create a proper macos app :P |
12:41:13 | Yardanico | see https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html#//apple_ref/doc/uid/10000123i-CH101-SW1 |
12:41:36 | Yardanico | oh sorry that's for ios |
12:41:53 | FromGitter | <bung87> no , on macos for win |
12:41:59 | Yardanico | hm |
12:42:19 | FromDiscord | <bedwardly-down> You're wanting to cross-compile from mac to win, bung? |
12:42:21 | FromGitter | <bung87> i searched using bing and github |
12:42:22 | Yardanico | it might be available with mingw |
12:42:59 | FromDiscord | <bedwardly-down> Bung, did you see the link I posted earlier about clang-mingw? |
12:43:07 | FromGitter | <bung87> I saw the mingw offical site, macos doesnot contains windres, |
12:43:22 | federico3 | now that type hinting is becoming more common in Python, a good py2nim translator could be doable |
12:43:32 | FromGitter | <bung87> I have not seen |
12:43:49 | FromDiscord | <bedwardly-down> https://github.com/mstorsjo/llvm-mingw |
12:44:25 | FromDiscord | <bedwardly-down> I don't know if that'd be useful to you, but it does build and at least works on Linux |
12:45:32 | FromGitter | <bung87> wow , it has a llvm-windres could be used |
12:45:58 | FromGitter | <bung87> https://github.com/mstorsjo/llvm-mingw/blob/master/wrappers/windres-wrapper.c#L79 |
12:46:37 | Yardanico | ok |
12:46:40 | FromDiscord | <bedwardly-down> 😄 |
12:46:40 | Yardanico | apparently I'm getting a triple fault |
12:46:49 | Yardanico | "On the x86 computer architecture, a triple fault is a special kind of exception generated by the CPU when an exception occurs while the CPU is trying to invoke the double fault exception handler, which itself handles exceptions occurring while trying to invoke a regular exception handler." |
12:46:50 | Yardanico | wtf |
12:49:12 | FromDiscord | <bedwardly-down> Damn. Even though I changed the compiler settings to clang in the config, it's begging for i686-elf-gcc |
12:49:21 | Yardanico | it's not that simple |
12:49:26 | FromDiscord | <bedwardly-down> Did you change it elsewhere that I missed? |
12:49:27 | Yardanico | and you need to change it in Makefile |
12:49:36 | FromDiscord | <bedwardly-down> Gotya |
12:51:48 | FromGitter | <alehander92> Yardanico awesome |
12:52:00 | FromGitter | <alehander92> i just wanted to study / work on my toy kernel |
12:52:09 | FromGitter | <alehander92> oh yeah this happens often! |
12:52:14 | FromGitter | <alehander92> the triple fault thing |
12:52:20 | Yardanico | well how do I debug it? :D |
12:52:22 | FromGitter | <alehander92> basically there is |
12:52:32 | FromGitter | <alehander92> one other nim kernel which does the interrupt things ok and it worked |
12:52:49 | FromGitter | <alehander92> but it uses the GPL3 License |
12:52:49 | Yardanico | https://github.com/samanthadoran/Mero ? |
12:52:49 | FromGitter | <alehander92> https://github.com/samanthadoran/Mero |
12:52:59 | Yardanico | hah |
12:52:59 | FromGitter | <alehander92> yeaa, i actually mailed the woman who wrote it |
12:53:11 | FromGitter | <alehander92> because it didnt have a license file before iirc |
12:53:19 | FromGitter | <alehander92> she seemed pretty welcoming |
12:53:31 | FromGitter | <alehander92> so afaik she studied from osdev etc and based it on it |
12:53:41 | FromGitter | <alehander92> and i managed to integrate it in my one |
12:53:47 | FromGitter | <alehander92> but now i decided to do it myself |
12:54:00 | FromGitter | <alehander92> and dont use so much of others code |
12:54:05 | FromDiscord | <bedwardly-down> bung87, got any tips on how to get this to compile with Clang? My version installed should cross compile with no issues, just changing compiler in both the config and Makefile here isn't allowing me to use Clang still. |
12:54:08 | FromGitter | <alehander92> but if you're mostly interested in the language in the toy |
12:54:11 | FromGitter | <alehander92> kernel |
12:54:17 | FromGitter | <alehander92> you can run it without all that stuff? |
12:54:22 | Yardanico | ? |
12:54:35 | FromGitter | <alehander92> you can just start it similarly to dom96's one |
12:54:50 | Yardanico | well the point is that I want to make it work with --os:any --gc:arc |
12:55:01 | FromGitter | <alehander92> okkk |
12:55:05 | FromGitter | <alehander92> yes i think i did |
12:55:06 | FromGitter | <alehander92> you know what |
12:55:09 | Yardanico | and it actually compiles after commenting some stuff |
12:55:18 | Yardanico | but does a triple fault when I try to create a seq |
12:55:18 | FromGitter | <alehander92> i planned on streaming a bit of my playing/studying with it |
12:55:20 | Yardanico | at runtime |
12:55:32 | FromGitter | <alehander92> i can try to see if it really works on my setup |
12:55:39 | FromDiscord | <bedwardly-down> Outside of building custom linux kernels, this is brand new to me |
12:55:41 | FromGitter | <bung87> @bedwardly-down yeah , please I have not install it for now, any thing I should noticed? |
12:55:59 | Yardanico | also exception handling with arc works (I mean it worked with old nimkernel too) |
12:56:13 | Yardanico | although getStackTrace() causes the kernel to crash too (getCurrentExceptionMsg works) |
12:56:52 | FromDiscord | <bedwardly-down> I'm new to nim and, so far, @bung87, it's wanting the gcc cross-compiler that Yar here is using |
12:57:20 | Yardanico | as I said you can use chaotic-aur unofficial arch repo so you don't have to compile yourself |
12:57:29 | Yardanico | or install from AUR with compilation from source :P |
12:57:45 | FromGitter | <alehander92> Yardanico i manged |
12:57:49 | FromGitter | <alehander92> to build gcc binutils |
12:57:51 | FromGitter | <alehander92> i think |
12:57:56 | Yardanico | well it's not an issue for me really |
12:57:58 | FromGitter | <alehander92> and i planned to use their cross compiler |
12:58:11 | Yardanico | oh wait there's also https://github.com/pascalmouret/assyria |
12:58:16 | Yardanico | MIT |
12:58:32 | FromGitter | <alehander92> yeah but "current goals" |
12:58:36 | FromGitter | <alehander92> are similar to ours now :P |
12:58:39 | Yardanico | uh |
12:58:50 | Yardanico | https://github.com/mikra01/nimkernel_ext |
12:58:55 | Yardanico | MIT |
12:58:59 | Yardanico | "basic gdt/idt/pic init" |
12:59:24 | FromGitter | <alehander92> ok |
12:59:29 | FromGitter | <alehander92> Yardanico i planned |
12:59:32 | FromGitter | <alehander92> to |
12:59:41 | FromGitter | <alehander92> refactor those to simple package |
13:00:00 | FromGitter | <alehander92> so one can add `x86` or `gdt_etc` or something like that |
13:00:01 | FromGitter | <bung87> @bedwardly-down that's fine, I will spawn process wait and pass to nim c |
13:00:03 | FromGitter | <alehander92> in his package |
13:00:08 | FromGitter | <alehander92> and directly start working on top of that |
13:00:20 | FromGitter | <alehander92> because i saw that people did something like that in rust |
13:00:49 | FromGitter | <alehander92> something like https://docs.rs/x86_64/0.10.1/x86_64/ |
13:01:01 | Yardanico | huh |
13:01:03 | FromDiscord | <bedwardly-down> I'm getting somewhere here |
13:01:04 | FromGitter | <alehander92> but maybe just for x86 |
13:01:10 | FromGitter | <bung87> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5eac1d960b23797ec056b31a] |
13:01:28 | FromGitter | <alehander92> Yardanico but again, this shouldn't be needed to just see if sequences work |
13:01:31 | FromDiscord | <bedwardly-down> Comments require space or they are ignored? |
13:01:32 | FromGitter | <alehander92> they *should* work |
13:01:37 | Yardanico | yeah right |
13:01:39 | FromGitter | <bung87> I was trying to do this, then I realise mingw-64 does not contain windres |
13:01:54 | FromGitter | <alehander92> i managed to run with `--gc:newruntime` or something like that before |
13:01:57 | FromGitter | <alehander92> iirc |
13:02:05 | FromGitter | <alehander92> but it was harder |
13:02:10 | Yardanico | well they seem to work with --gc:none --exceptions:goto :P |
13:02:13 | Yardanico | but it crashes later anyway |
13:02:18 | FromGitter | <alehander92> but how does it crash |
13:02:22 | Yardanico | on trying to convert an int to a string and concat with another strng |
13:02:26 | Yardanico | well kinda like a reboot |
13:02:36 | FromGitter | <alehander92> oooh |
13:02:41 | FromGitter | <alehander92> yeah those invoke some internal stuff |
13:02:43 | FromGitter | <alehander92> so IIRC |
13:02:49 | FromGitter | <alehander92> i needed to also provide a libc.c file |
13:02:56 | FromGitter | <alehander92> and link it with my nim produced c files |
13:03:01 | Yardanico | well I did --define:nimNoLibc |
13:03:05 | Yardanico | and yes that works |
13:03:13 | FromGitter | <alehander92> hm, but what does it invoke then |
13:03:17 | Yardanico | for wat? |
13:03:17 | FromGitter | <alehander92> for allocation etc |
13:03:27 | FromGitter | <alehander92> it has to somehow get memory |
13:03:28 | Yardanico | functions implemented in nim itself :P |
13:03:35 | FromGitter | <alehander92> but they have to call something |
13:03:51 | Yardanico | yes |
13:03:56 | Yardanico | they are implemented in nim itself |
13:04:01 | Yardanico | if useLibC is false |
13:04:08 | FromGitter | <alehander92> but what do they do |
13:04:11 | Yardanico | https://github.com/nim-lang/nim/blob/devel/lib/system/memory.nim |
13:04:15 | FromGitter | <alehander92> they dont just go "lets return a random pointer" |
13:04:33 | FromGitter | <alehander92> hm yeah, but i wonder |
13:04:34 | FromGitter | <alehander92> about alloc |
13:04:42 | Yardanico | ah about alloc |
13:04:45 | Yardanico | it's in osalloc.nim |
13:04:47 | FromGitter | <alehander92> huh but that is good yeah |
13:04:55 | Yardanico | https://github.com/nim-lang/nim/blob/devel/lib/system/osalloc.nim#L277 |
13:04:59 | Amun_Ra | are items in seq contiguous? |
13:05:12 | Yardanico | if you pass -d:StandaloneHeapSize:1234 it'll compile this block |
13:05:31 | Yardanico | maybe that's why it's failing for me though |
13:05:38 | Yardanico | maybe I've passed an invalid size or something |
13:06:15 | Amun_Ra | hmm, it seems not |
13:06:49 | FromGitter | <alehander92> ohhh |
13:06:55 | FromGitter | <alehander92> yeah i think i changed that in my nim! |
13:07:00 | Yardanico | really? |
13:07:00 | FromGitter | <alehander92> to 1 ? or something |
13:07:05 | FromGitter | <alehander92> yeah i just patched it |
13:07:10 | Yardanico | changed what exactly? :P |
13:07:22 | FromGitter | <alehander92> wow |
13:07:29 | FromGitter | <alehander92> i think i made my own global pointer |
13:07:57 | FromGitter | <alehander92> ok |
13:08:08 | FromGitter | <alehander92> good stuff |
13:08:17 | FromGitter | <alehander92> so then i am not sure what happens |
13:09:10 | FromGitter | <alehander92> how much is PageSize ? |
13:09:21 | Yardanico | seems to be 4096 actually |
13:09:27 | Yardanico | PageShift = when defined(cpu16): 8 else: 12 and PageSize = 1 shl PageShift |
13:09:34 | Yardanico | !eval echo 1 shl 12 |
13:09:36 | NimBot | 4096 |
13:09:53 | FromGitter | <alehander92> that is not much at all |
13:09:55 | Yardanico | so it's 4mb |
13:09:57 | FromGitter | <alehander92> no i mean it is |
13:10:07 | Yardanico | well I passed 16384 :P |
13:10:18 | FromDiscord | <bedwardly-down> I'm building the your gcc compiler from source. I will stand firm and not touch that aur with a 10 foot pole. 😛 |
13:10:19 | FromGitter | <alehander92> ok so you can |
13:10:23 | FromGitter | <alehander92> gdb it i |
13:10:24 | * | couven92 quit (Quit: Client Disconnecting) |
13:10:34 | FromGitter | <alehander92> awesome |
13:10:37 | * | zacharycarter joined #nim |
13:10:45 | * | fredrikhr joined #nim |
13:11:17 | Yardanico | also I have serial hooked up and I made a simple debug template to understand where the code stops working :P |
13:11:44 | FromGitter | <alehander92> https://wiki.osdev.org/Kernel_Debugging |
13:11:48 | FromGitter | <alehander92> look at gdb |
13:11:49 | FromGitter | <alehander92> ah ok |
13:11:54 | FromGitter | <alehander92> are you running it on hardware |
13:11:58 | Amun_Ra | hmm, it seems seqs are contiguous after all, it's just addr s works when s in an array, it should be addr s[0] for seqs |
13:12:02 | Yardanico | qemu |
13:13:16 | FromGitter | <alehander92> is there a way |
13:13:21 | Yardanico | well seems like it can actually allocate ref objects at runtime |
13:13:22 | FromGitter | <alehander92> to somehow log something |
13:13:25 | Yardanico | I just tried creating a ref object |
13:13:27 | FromGitter | <alehander92> yeah it should |
13:13:39 | FromGitter | <alehander92> coming it 5 min |
13:16:27 | Araq | Amun_Ra, they are continguous |
13:17:32 | FromDiscord | <bedwardly-down> Chaotic-AUR was super easy to setup. Thanks... |
13:17:57 | FromDiscord | <bedwardly-down> Let's see if I can help figure this out |
13:17:58 | Yardanico | Araq: so about --os:any --gc:arc - there are two places in mmdisp and one in excpt.nim which require IO |
13:18:37 | Yardanico | mmdisp.nim 65 and 66 (quit isn't there on --os:any either I guess) and excpt.nim 45 |
13:19:27 | Yardanico | "Your platform should support only some basic ANSI C library stdlib and stdio functions which should be available on almost any platform." ah right |
13:19:28 | FromDiscord | <bedwardly-down> I'm getting a stdio.h header missing error |
13:19:37 | Yardanico | check my notes |
13:19:40 | Yardanico | you should do all 4 patches :P |
13:19:49 | * | Cadey quit (Disconnected by services) |
13:20:03 | Yardanico | so I guess with --os:any I'll either have to patch these places or then properly provide an alternative for stdlib.h and stdio.h (even if just stubs) |
13:20:04 | * | Xe is now known as Cadey |
13:20:05 | FromDiscord | <bedwardly-down> I didn't pull them in |
13:20:14 | Yardanico | i mean in the notes |
13:20:18 | * | Guest30980 joined #nim |
13:20:33 | FromDiscord | <bedwardly-down> In the notes in the repo, right? |
13:20:36 | Yardanico | yes |
13:20:39 | Yardanico | at the bottom of readme |
13:22:40 | FromDiscord | <bedwardly-down> I'm guessing these changes are for the actual language and not the kernel? |
13:23:09 | Yardanico | yep |
13:23:17 | Yardanico | nimfolder is where your nim source folder is located |
13:24:27 | FromDiscord | <bedwardly-down> Ok, so I need to download the repo itself |
13:24:48 | FromDiscord | <bedwardly-down> I don't have the source, just the binaries |
13:24:56 | Yardanico | well you have the "source" |
13:24:59 | Yardanico | you always have it |
13:25:09 | Yardanico | since stdlib modules are just .nim files |
13:25:11 | Yardanico | same for system |
13:25:19 | FromDiscord | <bedwardly-down> I don't know what that means |
13:26:09 | Yardanico | well how did you install nim? |
13:26:14 | FromDiscord | <bedwardly-down> Gotya. Misread part of that |
13:26:17 | FromDiscord | <bedwardly-down> Choosenim |
13:26:48 | Yardanico | then these files will be somewhere in ~/.choosenim/toolchains/nim-ver/ |
13:26:56 | Yardanico | ver is the version you've installed |
13:27:06 | FromDiscord | <bedwardly-down> Gotya. I was looking in the wrong folder |
13:28:12 | FromDiscord | <bedwardly-down> Are you on head or devel, yarn? I have stable and both of those and want to test on same branch |
13:28:19 | FromDiscord | <bedwardly-down> or version, I mean |
13:28:21 | Yardanico | well I'm on devel |
13:28:34 | Yardanico | but there isn't really much to test |
13:29:15 | FromDiscord | <bedwardly-down> So, nim isn't a bleeding edge breaks everything kind of language? |
13:29:17 | zacharycarter | why does choosenim have so many tendrils into my machine and why is not removing ~/.choosenim from my system enough |
13:29:26 | zacharycarter | now any time I try to install a nimble package I get an error about choosenim |
13:29:32 | Yardanico | !bedwardly-down nim is over 1.x already |
13:29:36 | Yardanico | 1.0 i mean |
13:30:06 | FromDiscord | <bedwardly-down> I'm used to different languages having the master branch be incompatible with stable, so 😛 |
13:30:08 | dom96 | zacharycarter, what errors are you getting? |
13:30:21 | dom96 | there are only two places that choosenim touches: ~/.choosenim and ~/.nimble/bin |
13:30:39 | zacharycarter | yeah I've removed both of those |
13:30:41 | zacharycarter | but - Error: getAppFilename failed. (Error was: Unable to read /Users/zacharycarter/.choosenim/current. (Error was: No installation has been chosen. (File missing: /Users/zacharycarter/.choosenim/current))) |
13:30:56 | dom96 | running what? `nimble` or `nim`? |
13:31:00 | zacharycarter | nimble install nimterop |
13:31:06 | dom96 | which nimble |
13:31:21 | zacharycarter | maybe it's the nimble that was installed with choosenim? |
13:31:28 | zacharycarter | I can't even run nimble -v now |
13:31:30 | dom96 | did you copy it? |
13:31:44 | zacharycarter | no - let me just try removing nimble and installing it with ./koch tools |
13:31:53 | dom96 | well, where is it then? |
13:32:01 | zacharycarter | oh okay - if I remove ~/.nimble I stop getting that error message |
13:32:05 | dom96 | you say you've removed ~/.nimble/bin |
13:32:13 | dom96 | but yeah, you haven't :) |
13:32:13 | zacharycarter | no I just removed choosenim from there |
13:32:18 | zacharycarter | not nimble itself |
13:32:21 | zacharycarter | but now I have :) |
13:32:28 | dom96 | yes, choosenim puts binaries there |
13:32:38 | zacharycarter | ah okay - thanks for the help and explanation :) |
13:33:05 | FromGitter | <kaushalmodi> At work, I deploy nim by simply untarring the nim release tarball: http://ix.io/2kiD/sh |
13:33:26 | zacharycarter | well I liked choosenim but I wanted to install a specific branch of the Nim repo and I couldn't figure out how |
13:33:51 | FromDiscord | <Zed> has anybody done intense numerical computing with nim? |
13:34:03 | zacharycarter | yes |
13:34:12 | zacharycarter | but I don't know what you consider intense numerical computing? |
13:34:24 | dom96 | zacharycarter, choosenim #branch_name |
13:34:36 | zacharycarter | hmm I tried that but couldn't get it working |
13:34:45 | zacharycarter | I tried wrapping #branch_name in double quotes as well |
13:34:58 | dom96 | it should work, bug report? :) |
13:35:05 | zacharycarter | sure - I will try to reproduce |
13:35:14 | FromDiscord | <Zed> large machine learning datasets |
13:35:30 | zacharycarter | Zed: maybe check out arraymancer and nimdata and numforge/laser |
13:35:54 | FromDiscord | <bedwardly-down> Yar, I think there's a slight typo in your notes. Line 45 of excpt.nim is not the same |
13:35:56 | zacharycarter | there are several folks in the data-science / ML space using Nim mratsim would be a great resource to ask questions like this to |
13:36:26 | Yardanico | system/excpt.nim:45 ? |
13:36:29 | FromDiscord | <bedwardly-down> I did find multiple showErrorMessages, though |
13:36:31 | FromDiscord | <bedwardly-down> Yup |
13:36:32 | Yardanico | I just checked and it is |
13:36:39 | Yardanico | you just need to replace the one on line 45 |
13:36:40 | FromDiscord | <Zed> thanks zac!! |
13:36:42 | Yardanico | with "discard" |
13:36:46 | zacharycarter | Zed: np |
13:36:48 | Yardanico | no need to touch others |
13:37:05 | FromDiscord | <bedwardly-down> Let me look at it again because I found a different line altogether |
13:37:30 | FromDiscord | <bedwardly-down> `writeToStdErr(data)` |
13:37:41 | Yardanico | ah right |
13:37:44 | FromDiscord | <bedwardly-down> That's what's showing on line 45 |
13:37:45 | Yardanico | replace that |
13:38:13 | FromDiscord | <bedwardly-down> Gotya. You put the wrong info in notes. |
13:38:20 | Yardanico | as I said thought it doesn't really work now |
13:38:35 | Yardanico | you'll simply get a kernel which reboots after writing some stuff to the serial |
13:40:16 | zacharycarter | dom96: it worked :) I think last night I was trying choosenim install but `choosenim "#branch_name"` works |
13:40:21 | zacharycarter | user error |
13:40:36 | FromDiscord | <bedwardly-down> Not quite. I gotta add some extra software to finish building |
13:41:46 | dom96 | zacharycarter, feel free to make an issue to improve the error message when trying `install` |
13:41:57 | zacharycarter | will do |
13:43:56 | FromDiscord | <bedwardly-down> So running jackos.bin is giving a SIGSERVER Address Boundary Error, right? |
13:44:35 | FromDiscord | <bedwardly-down> And that's also the tiniest kernel I've seen. 112kb? O.o |
13:44:57 | zacharycarter | oooo people are writing kernels in Nim atm? |
13:45:10 | FromDiscord | <bedwardly-down> Wanna join the fun? |
13:45:16 | FromDiscord | <bedwardly-down> https://github.com/Yardanico/JackOS |
13:45:30 | Yardanico | there's no fun until it works with --gc:arc properly :P |
13:45:36 | Yardanico | @bedwardly-dow umm no? |
13:45:43 | Yardanico | you're supposed to do "make build" and then "make run" |
13:45:46 | Yardanico | and it'll run with eqmu |
13:45:58 | FromGitter | <dawkot> Would appreciate if someone who knows how VSCode extensions work would take a look at this: https://github.com/pragmagic/vscode-nim/pull/159 |
13:46:00 | Yardanico | "make build" is supposed to make an .iso |
13:46:08 | FromGitter | <alehander92> :) |
13:46:12 | FromGitter | <alehander92> Yardanico |
13:46:14 | FromDiscord | <bedwardly-down> I forgot to do make run. 😛 |
13:46:17 | Yardanico | @alehander92 ? |
13:46:20 | FromGitter | <alehander92> i'll try to run now mine |
13:46:24 | FromDiscord | <bedwardly-down> I'm getting coffee |
13:46:27 | FromGitter | <alehander92> did you guys make it work |
13:46:34 | Yardanico | well no :D |
13:47:06 | FromGitter | <alehander92> oh praise God what a day is today |
13:47:12 | FromGitter | <alehander92> we got an earthquake |
13:47:20 | FromGitter | <alehander92> and then an amazing afternoon |
13:47:22 | * | abm quit (Ping timeout: 260 seconds) |
13:47:30 | zacharycarter | so can all these updates just go back into nimkernel? |
13:47:34 | FromGitter | <alehander92> i really felt this 5.0 |
13:47:42 | Yardanico | zacharycarter: if they're stable enough, maybe I'll try |
13:47:49 | FromGitter | <alehander92> Yardanico my goal was |
13:47:50 | Yardanico | but https://github.com/watzon/JackOS itself is a fork of nimkernel |
13:47:56 | zacharycarter | lol yeah - but I wonder why |
13:47:58 | FromGitter | <alehander92> to eventually add `async` / `await` |
13:48:02 | Yardanico | wow |
13:48:03 | FromGitter | <alehander92> to the toy kernel |
13:48:07 | Yardanico | lool |
13:48:11 | zacharycarter | if all he did was bring it up to date with the current Nim and add a makefile |
13:48:12 | Yardanico | imagine a kernel with async |
13:48:16 | FromGitter | <alehander92> like a form of cooperative multitasking |
13:48:19 | FromGitter | <alehander92> yeah thats my idea |
13:48:23 | FromGitter | <alehander92> it seems not hard |
13:48:37 | FromGitter | <alehander92> basically the idea is to get the interrupts / setup to the point where one can |
13:48:58 | FromGitter | <alehander92> when i think about it you dont even really need this actually |
13:49:03 | dom96 | You guys are making me tempted to live stream updating nimkernel |
13:49:14 | FromGitter | <alehander92> i am going to live stream working on my kernel |
13:49:17 | zacharycarter | you should |
13:49:28 | Yardanico | dom96: well it's not that hard :P but I hope we can make it work with --gc:arc --os:any |
13:49:31 | Yardanico | that'll be amazing |
13:49:33 | Yardanico | strings/seqs/etc |
13:49:34 | FromGitter | <alehander92> but we can just all fix the same kernel :D |
13:49:58 | FromGitter | <alehander92> dom96 go go |
13:50:11 | Araq | Yardanico, well you need the heap emulation but then it shouldn't be a problem |
13:50:11 | Yardanico | i mean it already boots with --os:any --gc:arc but seqs don't work, or stack traces |
13:50:23 | FromGitter | <alehander92> hmm |
13:50:43 | Yardanico | Araq: is it correct that I should be setting StandaloneHeapSize for --os:any ? |
13:50:57 | Araq | yeah but maybe more is required |
13:51:20 | dom96 | Yardanico, yes, well, in that case I might add some more features :P |
13:51:37 | Yardanico | dom96: well I already added serial writing, it's really easy |
13:51:44 | Araq | it's only viable for a toy OS, in a real OS you should have kalloc/malloc offered by your kernel |
13:52:07 | FromDiscord | <bedwardly-down> We have something |
13:52:07 | FromDiscord | <bedwardly-down> https://cdn.discordapp.com/attachments/371759389889003532/705778580365246544/20200501_08h52m07s_grim.png |
13:52:15 | Yardanico | yeah check serial.log |
13:52:43 | FromGitter | <alehander92> @dom96 do it! |
13:52:58 | Yardanico | or you can just remove all lines in main which start/or are in the "debug" block |
13:53:01 | FromGitter | <alehander92> my plan was to basically simulate a process system |
13:53:08 | Yardanico | so it's let attr = stuff, and then writeString ... |
13:53:27 | FromGitter | <alehander92> using nim functions as processes ⏎ ⏎ ``` async/await + cancellation for multitasking``` [https://gitter.im/nim-lang/Nim?at=5eac29d79ac8ce14a5944013] |
13:53:45 | FromGitter | <alehander92> and their types for protecting access to data structures/filesystem |
13:54:36 | disruptek | balls. |
13:54:51 | FromDiscord | <bedwardly-down> I have a blank serial.log. O.o |
13:56:07 | FromGitter | <alehander92> so e.g. you do stuff like let res = await fs.write(myPath, structuredObject) |
13:56:39 | FromGitter | <alehander92> and e.g. all stuff in the filesystem is just structured values (and maybe strings/binary as a subcase) |
13:56:52 | FromDiscord | <bedwardly-down> Toy kernels a common thing for you guys? I didn't even know those were a thing |
13:57:02 | Yardanico | not really :D |
13:57:04 | FromGitter | <alehander92> no, it's all talk for me |
13:57:10 | dom96 | what I would love is write an OS for the RPI |
13:57:33 | dom96 | perfect way to run your toy kernel on real hardware |
13:57:36 | Yardanico | blob:https://imgur.com/e8f6c72d-6af9-414c-8b04-3be994ced124 |
13:57:51 | Yardanico | dom96: https://github.com/andrewrk/clashos :D although it only shows hello world |
13:57:53 | FromGitter | <alehander92> @dom96 the cool thing is you can write a custom macro async which generates |
13:58:05 | FromGitter | <alehander92> cooperative switching between the os tasks |
13:58:08 | * | liblq-dev quit (Ping timeout: 246 seconds) |
13:58:08 | Yardanico | but zig's author made a cool post about adding stack trace support for barebones target |
13:58:11 | FromGitter | <alehander92> i saw it in rust |
13:58:18 | FromGitter | <alehander92> and i wanted to play with that since that |
13:58:34 | FromGitter | <alehander92> https://os.phil-opp.com/async-await/#cooperative-multitasking-1 |
13:58:42 | FromDiscord | <bedwardly-down> Honestly, I think this is cool as hell |
13:58:52 | Yardanico | https://i.imgur.com/ObUQPNV.png i meant |
13:59:21 | FromDiscord | <bedwardly-down> I'm learning a game framework that is built around the structure of a kernel |
13:59:40 | Yardanico | the era has ended... https://github.com/nim-lang/Nim/commit/9c33bcac5c73f8188e1c017ba8b2a14db5d5a4fe |
14:00:19 | * | liblq-dev joined #nim |
14:00:51 | Araq | if you want to write kernels, figure out how to steal drivers from Linux's codebase. or maybe from BSD to avoid Linux's viral license |
14:01:16 | Yardanico | well I don't really want to since I have far less experience than required for proper kernels and OSes :D |
14:02:02 | Araq | the drivers are everything, everybody can code an O(1) scheduler based on linked lists, it's not hard, you don't write it in C and then it's easy enough :P |
14:02:08 | dom96 | if you want to be practical then your best bet is to write on top of Linux or BSD |
14:02:14 | Yardanico | yeah i guess so |
14:02:21 | Yardanico | FreeBSD steals drivers from Linux though :D |
14:02:34 | FromDiscord | <bedwardly-down> I wonder if using Callistios would be a good place to learn too. You know that project? |
14:02:36 | Araq | or steal code from the unikernel projects |
14:02:44 | dom96 | The evidence that it works is out there, AFAIK PS4 OS is based on BSD |
14:02:49 | Yardanico | yeah |
14:02:53 | Araq | yup, it is |
14:03:04 | Yardanico | "The native operating system of the PlayStation 4 is Orbis OS, which is a fork of FreeBSD version 9.0 which was released on 12 January 2012." |
14:03:10 | FromDiscord | <bedwardly-down> KallistiOS is a Dreamcast OS |
14:04:07 | FromDiscord | <bedwardly-down> Wait, what? PS4 uses that? |
14:04:24 | Araq | PS4 is based on BSD, yeah |
14:04:31 | FromGitter | <alehander92> Araq the funny thing is to write some very custom |
14:04:33 | FromGitter | <alehander92> stuff |
14:05:20 | Yardanico | btw echo "hello world" with -d:danger --gc:arc --os:any -d:StandaloneHeapSize:4096 --opt:size and static linking with musl (and stripping) produces a 20kb binary |
14:05:41 | Yardanico | while it's not that low, it still allows for all your usual seqs and stuff unlike gc:none |
14:06:21 | Yardanico | ah also --panics:on |
14:06:30 | Araq | Yardanico, also use -d:noSignalHandler --panics:on |
14:07:13 | Yardanico | with no signal handlers it's 17.7kb :P |
14:07:18 | Yardanico | fully static |
14:07:31 | Yardanico | and yes I'm using zig to cross-compile for x86_64-linux-musl |
14:07:54 | FromDiscord | <bedwardly-down> I haven't tried musl for anything. How is it? |
14:08:21 | disruptek | like compromising with wayland... but on steroids. |
14:08:36 | Yardanico | yeah musl is usually used when you want static binaries :P |
14:08:54 | FromDiscord | <bedwardly-down> I just set up Wayland out of fear and anxiety this morning. Haha |
14:08:56 | Yardanico | or when you have limited memory I guess |
14:09:11 | disruptek | that's why i used it as an example. |
14:09:23 | FromGitter | <alehander92> Yardanico wow you do use zig |
14:09:34 | Yardanico | yes it actually works for cross compiling stuff |
14:09:49 | Araq | I'd write my own libc in Nim but I can't be bothered |
14:09:57 | FromDiscord | <bedwardly-down> I use ED to write code in, so that's just as nuts I would think |
14:09:59 | Yardanico | it's just clang with headers for different libcs and with musl sources :P |
14:10:12 | FromGitter | <alehander92> btw guys |
14:10:23 | FromGitter | <alehander92> how do you pass a custom c compiler |
14:10:24 | FromGitter | <alehander92> to nim |
14:10:26 | Araq | in fact, Nim doesn't use much out of libc anyway |
14:10:38 | Yardanico | @alehander92 if it's compatible with gcc/clang, then you just do stuff like gcc.exe.path |
14:10:41 | Araq | alehander92: --gcc.exe=blah |
14:10:42 | FromGitter | <alehander92> writing a minimal libc is not too hard i think |
14:10:42 | Yardanico | or clang.exe.path |
14:10:45 | FromGitter | <alehander92> ahh thanks! |
14:10:52 | Yardanico | or just port musl to Nim :P |
14:11:04 | Yardanico | it's MIT |
14:11:06 | FromDiscord | <bedwardly-down> Thanks, Yar |
14:11:30 | Araq | yeah but musl probably uses 1000 lines of code to figure out which integer type to typedef |
14:11:31 | dom96 | Araq, sounds fun. You should post a call for action. I've seen lots of people writing libc implementations for fun |
14:11:55 | Yardanico | im actually curious how big musl is hmm |
14:11:56 | disruptek | i wrote a package manager for fun. |
14:12:03 | disruptek | oh wait, no. |
14:12:05 | FromGitter | <alehander92> musl was a *lot* of work |
14:12:07 | FromGitter | <alehander92> afaik |
14:12:29 | Yardanico | cloc says it's 50k of C and 30k of C headers (with 6k assembly), and that's ofc excluding comments/blank lines |
14:12:30 | FromDiscord | <bedwardly-down> I wonder how musl compares to eglibc and dietc? |
14:12:32 | FromGitter | <alehander92> for a custom kernel i'd love to just see random designs |
14:12:40 | FromGitter | <alehander92> different syscall schemes and all of that |
14:12:41 | FromGitter | <sealmove> guys, what's the best way to debug right now? |
14:12:46 | FromGitter | <alehander92> no hw memory protection |
14:13:17 | FromGitter | <sealmove> i remember krux have done some work on debugging cli interface? |
14:13:55 | FromDiscord | <bedwardly-down> Got a good place to start on learning how to do kernel stuff like this more often? I didn't do anything but go through the build steps, but this is definitely my jam |
14:13:57 | Araq | when you write a kernel, you get to decide the syscall scheme... |
14:14:11 | Yardanico | https://wiki.osdev.org |
14:14:18 | FromGitter | <alehander92> Araq yeah exactly |
14:14:20 | FromGitter | <alehander92> what i mean is |
14:14:25 | FromGitter | <alehander92> that people love to do linux again |
14:14:25 | Araq | look, libc works on top of an OS, but you're writing an OS... |
14:14:29 | FromGitter | <alehander92> whic is great |
14:14:38 | FromGitter | <alehander92> yeah, thats my point |
14:15:00 | FromDiscord | <bedwardly-down> And much of the os is dependent on libc, right? |
14:15:08 | Yardanico | well indirectly |
14:15:47 | Araq | good, so write some assembler already. seriously |
14:16:01 | FromGitter | <alehander92> i am trying to get my nim to compile :D |
14:16:12 | Araq | you don't need muslimC's Linux specific syscall code |
14:16:18 | Yardanico | XDD |
14:16:25 | Yardanico | just need to write a macro so we can write safe assembly |
14:16:31 | FromDiscord | <bedwardly-down> Bwahahaha |
14:16:32 | FromGitter | <alehander92> good idea! |
14:16:36 | FromGitter | <alehander92> yardanico my plan was to |
14:16:54 | FromGitter | <alehander92> not turn on memory protection and to somehow detect all that stuff on compile time :D |
14:16:59 | FromDiscord | <bedwardly-down> And I need to actually learn how to use nim |
14:17:12 | FromGitter | <alehander92> when i think about it |
14:17:13 | FromDiscord | <bedwardly-down> I just joined here half asleep last night after work |
14:17:15 | FromGitter | <alehander92> i can use z3 |
14:17:22 | Araq | in fact, also don't use the freaking "GNU assembler", get a real one |
14:17:24 | FromGitter | <alehander92> to detect that ranges are not entered into |
14:17:54 | FromDiscord | <bedwardly-down> What is a real assembler, then? |
14:18:07 | FromGitter | <alehander92> but this doesnt seem to make sense now in my head |
14:20:25 | FromDiscord | <bedwardly-down> I don't know much about assemblers and have only used the clang and gnu ones |
14:20:57 | Yardanico | when people have too much time they write forums in assembly |
14:20:58 | FromGitter | <alehander92> hm, i dont have stdint.h |
14:21:20 | Yardanico | (https://asm32.info/fossil/repo/asmbb/index and https://board.asm32.info/ for live instance) |
14:21:49 | FromDiscord | <bedwardly-down> Also, +1 for fossil link. 😄 |
14:21:56 | Yardanico | but wait isn't it better than nimforum /s |
14:22:02 | Yardanico | it has TAGS |
14:23:11 | FromDiscord | <bedwardly-down> Ummmm.... What? |
14:23:18 | Yardanico | although nimforum had merged categories already, just didn't update the live instance |
14:23:27 | FromDiscord | <bedwardly-down> Why do that? |
14:23:46 | FromDiscord | <bedwardly-down> Why make a forum in assembly language? |
14:23:54 | * | Zevv left #nim (#nim) |
14:24:14 | * | Vladar quit (Quit: Leaving) |
14:24:18 | FromGitter | <alehander92> dude |
14:24:19 | Yardanico | why not? :D that's how these questions are answerred |
14:24:20 | FromGitter | <alehander92> my stdint.h |
14:24:27 | FromGitter | <alehander92> includes with include_next stdint.h |
14:24:29 | Yardanico | lol |
14:24:30 | FromGitter | <alehander92> what does this mean |
14:24:41 | Yardanico | and this forum is actually pretty small and light |
14:24:48 | Yardanico | although I wouldn't write in assembly :P |
14:25:43 | FromDiscord | <bedwardly-down> Would you do it in Nim? |
14:26:05 | Yardanico | of course, if i had do :P |
14:26:09 | Yardanico | to* |
14:26:17 | FromGitter | <alehander92> oh i forgot to pass -ffreestanding |
14:27:20 | FromGitter | <alehander92> Yardanico |
14:27:32 | FromGitter | <alehander92> nostdlib |
14:27:34 | Yardanico | yes? |
14:27:47 | FromGitter | <alehander92> how to nim |
14:27:49 | FromGitter | <alehander92> no stdlib |
14:27:50 | FromGitter | <alehander92> :D :D D: |
14:27:59 | FromGitter | <alehander92> i cant seem to pass it |
14:28:04 | Yardanico | uhh |
14:28:10 | FromGitter | <alehander92> either with `-d` or the other |
14:28:16 | Yardanico | --passC |
14:28:20 | Yardanico | or/and --passL |
14:28:23 | FromGitter | <alehander92> but it generates |
14:28:30 | FromGitter | <alehander92> include <stdlib.h> in the nim source |
14:28:39 | FromGitter | <alehander92> i thought nim itself should not generate it |
14:28:45 | Yardanico | ah right |
14:28:49 | Yardanico | I just have an empty stdlib.h :DDDDDD |
14:28:54 | Yardanico | https://github.com/Yardanico/JackOS/blob/master/kernel/stdlib.h |
14:29:17 | Yardanico | just add an empty stdlib.h in your include path |
14:29:17 | FromGitter | <alehander92> smart! |
14:29:40 | Yardanico | don't forget -d:nimNoLIbc and -d:noSignalHandler |
14:29:43 | FromDiscord | <bedwardly-down> Holy hell!!! The first tutorial compiling and running is kind of satisfying |
14:29:55 | FromGitter | <alehander92> oh man i had this |
14:29:57 | FromDiscord | <bedwardly-down> The output here is nice |
14:30:02 | FromGitter | <alehander92> even with some files! |
14:30:11 | FromGitter | <alehander92> some files |
14:30:17 | FromGitter | <alehander92> i forgot |
14:32:14 | FromGitter | <alehander92> Araq can i pas ld.exe |
14:32:30 | FromGitter | <bedwardly-down> Hello |
14:33:20 | FromGitter | <bedwardly-down> With my current setup, this is much easier than using Discord for chat here |
14:33:48 | FromGitter | <sealmove> Is there a way to simulate "any" type for an object's field? |
14:34:04 | FromGitter | <sealmove> I mean for runtime |
14:34:23 | FromGitter | <alehander92> variants or generics or ptr/RootObject ref if its ref |
14:34:24 | FromGitter | <alehander92> ? |
14:35:19 | * | fredrikhr quit (Read error: Connection reset by peer) |
14:35:47 | * | fredrikhr joined #nim |
14:36:22 | FromGitter | <sealmove> generics don't work in this context |
14:37:07 | FromGitter | <sealmove> I want something similar to Java's `Object` type |
14:38:07 | FromGitter | <alehander92> but can you have stuff like |
14:38:11 | FromGitter | <alehander92> ints and other basic values |
14:38:12 | FromGitter | <alehander92> inside? |
14:38:16 | FromGitter | <alehander92> brandon hello! |
14:39:52 | FromGitter | <bedwardly-down> :hello: |
14:39:54 | FromGitter | <sealmove> @alehander92 not sure, probably only need objects. |
14:40:15 | FromGitter | <sealmove> yes, only need objects |
14:40:37 | FromGitter | <sealmove> actually the correct implementation is object variants... |
14:43:07 | FromGitter | <bedwardly-down> Think figuring out how to port a common library I use to Nim would be a good way to figure out its workings? |
14:45:37 | FromGitter | <alehander92> Yardanico hm, sorry, i'll look into your impl :D |
14:45:40 | * | thomasross joined #nim |
14:45:41 | FromGitter | <alehander92> i cant find out why |
14:45:49 | FromGitter | <alehander92> nim generates free/calloc/signal |
14:46:31 | FromGitter | <kaushalmodi> @bedwardly-down When I started with nim, I started using it a bash script replacement, then a Makefile replacement, then perl/python replacement, and now it's doing things for me that none of those can |
14:47:34 | FromGitter | <bedwardly-down> So, you used it as a scripting language more than anything else, right? |
14:48:01 | FromGitter | <alehander92> oh i didnt need! |
14:48:09 | FromGitter | <alehander92> i defined them . |
14:48:19 | FromGitter | <alehander92> but now my qemu just fails |
14:49:16 | zacharycarter | I was going to stream some game dev stuff - but I can't get OBS to display my full terminal window |
14:49:18 | FromGitter | <alehander92> ah, ran with wrong arch and without -kernel invalid kernel header |
14:49:19 | zacharycarter | so I gave up :/ |
14:49:24 | FromGitter | <alehander92> oh no zachary |
14:49:39 | FromGitter | <alehander92> cant you somehow resize it |
14:49:44 | zacharycarter | I have a meeting in 11 minutes - I'll try again after that |
14:49:44 | FromGitter | <alehander92> or reset settings |
14:49:51 | FromGitter | <alehander92> ok |
14:50:17 | zacharycarter | I tried! I set it to 2880 x 1800 and downsampled to like 1280x720 but some was still cut off |
14:51:15 | FromGitter | <alehander92> hmm |
14:51:21 | FromGitter | <alehander92> no idea |
14:51:25 | FromGitter | <alehander92> it just works iirc with mine |
14:52:26 | FromGitter | <bedwardly-down> How does nim handle package and file structures? |
14:53:19 | zacharycarter | what do you mean |
14:55:46 | FromGitter | <bedwardly-down> Example: `import hxmath.math.Vec2` is a lib file from the hxmath package in Haxe |
14:56:07 | Yardanico | https://nim-lang.org/docs/manual.html#modules-import-statement and down |
14:56:10 | Yardanico | (and below) |
14:56:16 | FromGitter | <bedwardly-down> That reads file structure wise as `hxmath/math/Vec2.hx` |
14:56:24 | Yardanico | in nim you do import a/b/c |
14:56:35 | zacharycarter | yeah nim doesn't have packages |
14:56:42 | zacharycarter | it's not Java / C# / Haxe |
14:56:45 | FromDiscord | <codic> now I can re-ask my question! |
14:57:04 | FromDiscord | <codic> For the nimcache directory for my project I have these files: |
14:57:04 | FromDiscord | <codic> `hw.json '@mhw.nim.c' '@mhw.nim.c.o' stdlib_io.nim.c stdlib_io.nim.c.o stdlib_system.nim.c stdlib_system.nim.c.o` |
14:57:04 | FromDiscord | <codic> but can't file the main flie I should be looking at |
14:57:08 | FromGitter | <bedwardly-down> Codic, my fellow Fishy user!!! :D |
14:57:10 | zacharycarter | you put things in modules and then import the modules and Nim handles only importing what is necessary when it compiels to C |
14:57:26 | Yardanico | @codic what's your main nim file called? |
14:57:32 | FromGitter | <bedwardly-down> Thanks @zacharycarter |
14:57:32 | zacharycarter | it's '@mhw.nim.c |
14:57:40 | zacharycarter | np |
14:57:42 | Yardanico | if it's hw.nim, then you should look into @mhw.nim.c |
14:57:45 | Yardanico | @m is just a prefix |
14:57:47 | FromDiscord | <codic> ah ok. |
14:57:48 | FromDiscord | <codic> Thanks |
14:57:57 | zacharycarter | the .o files are object files |
14:58:06 | zacharycarter | from the C/C++ compiler |
14:58:14 | zacharycarter | or Obj-C I guess |
14:58:21 | FromGitter | <bedwardly-down> I'm not a C/C++ dev, so that's pretty new to me |
14:58:23 | FromDiscord | <codic> Aw, I can't use `Ctrl R` to search history |
14:58:32 | FromGitter | <bedwardly-down> I kind of skipped them |
14:58:40 | zacharycarter | getting comfortable with C/C++ will certainly help you with Nim development |
14:59:33 | zacharycarter | but of course it's not a requirement |
14:59:53 | FromDiscord | <codic> Damn, this C seems to require the nimbase header |
14:59:53 | zacharycarter | actually Nim helped me become much more comfortable with reading C/C++ - I'm still not practiced enough at writing either |
15:00:04 | zacharycarter | and things like move semantics still elude me |
15:00:06 | FromDiscord | <codic> > `#include "nimbase.h"` |
15:00:18 | FromDiscord | <codic> Yeha, nim is pretty similar to c and all conceptually |
15:00:32 | FromGitter | <bedwardly-down> I'm reading a library that I want to use the source for and include uses Linux FS structure for module imports. Nice |
15:01:14 | FromDiscord | <Yardanico> Don't use include generally though |
15:01:24 | FromDiscord | <Yardanico> Most of the time you want import |
15:01:37 | FromGitter | <bedwardly-down> I see that nim has pointers too |
15:02:00 | FromGitter | <bedwardly-down> And Inline? That might make this port easier |
15:02:11 | FromGitter | <alehander92> Yardanico i managed to start |
15:02:11 | zacharycarter | Nim has managed and unmanaged pointers |
15:02:23 | zacharycarter | and yes it can inline procedures via the `{.inline.}` pragma |
15:02:27 | FromGitter | <alehander92> but the console output is just not there |
15:02:31 | FromGitter | <alehander92> how do you setup the serial |
15:03:00 | FromDiscord | <Yardanico> com.nim |
15:03:10 | FromDiscord | <Yardanico> It uses two procs from io.nim |
15:03:27 | FromDiscord | <Yardanico> Which are inline assembly |
15:05:18 | FromDiscord | <codic> Where can i find the file nimbase.h? |
15:06:06 | FromDiscord | <Yardanico> nimdir/lib/nimbase.h |
15:06:35 | FromDiscord | <Yardanico> Also if you want to read the C file made from you nim file, compile with -d:danger so there's much less debug code around |
15:07:36 | FromDiscord | <codic> alright, why is it called danger? |
15:07:39 | FromDiscord | <codic> And where's nimdir? |
15:08:45 | FromDiscord | <Yardanico> because -d:danger disables a lot of checks |
15:08:50 | FromGitter | <kaushalmodi> codic: Protip, navigate to https://github.com/nim-lang/Nim, hit the `t` key and type the file name |
15:09:01 | FromGitter | <alehander92> Yardanico ! |
15:09:03 | FromDiscord | <Yardanico> nimdir is the directory where your nim resides |
15:09:04 | FromGitter | <alehander92> good advice |
15:09:09 | FromGitter | <kaushalmodi> On Emacs, I use the projectile package to quickly find any file in a repo |
15:09:16 | FromGitter | <alehander92> so hmmm |
15:09:22 | FromGitter | <alehander92> i have to see why my screen |
15:09:40 | FromDiscord | <codic> ah |
15:10:11 | FromDiscord | <codic> Wait, but I installed it with `sudo pacman -S nim` |
15:10:17 | FromDiscord | <codic> probs /usr/share/nim or somethin |
15:10:28 | FromDiscord | <codic> nope that only has `doc` |
15:10:42 | * | abm joined #nim |
15:10:54 | FromDiscord | <Yardanico> Well search for it |
15:11:22 | * | fredrikhr quit (Ping timeout: 256 seconds) |
15:11:25 | FromDiscord | <codic> https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/nim |
15:11:26 | FromDiscord | <codic> there |
15:11:26 | FromDiscord | <codic> Got it |
15:14:13 | zacharycarter | is it possible to nest tasks in a nimscript file? |
15:14:43 | zacharycarter | or should I just turn one into a procedure? |
15:16:43 | zacharycarter | I just turned it into a proc |
15:17:36 | shashlick | You can |
15:17:50 | FromGitter | <kaushalmodi> > is it possible to nest tasks in a nimscript file? ⏎ ⏎ Yes |
15:18:03 | shashlick | task abc => abcTask() |
15:18:16 | zacharycarter | ah thanks |
15:18:25 | FromGitter | <kaushalmodi> If I have a task `foo` and I want to call in task `bar`, I called it using `selfExec("foo")` |
15:18:54 | FromGitter | <kaushalmodi> shashlick: ⏎ ⏎ > task abc => abcTask ⏎ ⏎ Oh, really? TIL :D [https://gitter.im/nim-lang/Nim?at=5eac3ddea9de3d01b1e0b73e] |
15:19:26 | zacharycarter | works perfectly! thanks guys :D |
15:19:42 | FromGitter | <kaushalmodi> heh, so we have at least 2 ways of doing that |
15:19:54 | * | joshbaptiste quit (Ping timeout: 265 seconds) |
15:20:44 | FromGitter | <kaushalmodi> shashlick: Where is that *abcTask* thing documented? |
15:22:15 | shashlick | No idea, I saw that in the code |
15:23:00 | * | joshbaptiste joined #nim |
15:23:36 | FromGitter | <kaushalmodi> yep, I just grepped for it ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5eac3ef797338850a2df67df] |
15:23:41 | FromDiscord | <clyybber> uh, github is buggy again |
15:24:11 | FromGitter | <kaushalmodi> *oops copied code using the wrong binding* |
15:24:59 | shashlick | @pigmej - re nimpcre |
15:25:11 | shashlick | can you share the code you are using? |
15:26:07 | disruptek | shashlick: do you have a 1.2 branch in your travis wrapper? does choosenim? |
15:27:30 | disruptek | Araq: you knew this was coming... can we backport .nosinks. to 1.0 as a noop? |
15:28:02 | * | solitudesf quit (Read error: Connection reset by peer) |
15:28:34 | shashlick | i cannot pick the branches, that has to be done in the yml file |
15:34:05 | shashlick | choosenim's yml doesn't have 1.2 since it only builds with 1.0 right now |
15:34:21 | shashlick | are you running into issues building choosenim on 1.2? |
15:37:55 | disruptek | github requires arc, thus nimph requires arc. |
15:39:22 | FromDiscord | <clyybber> disruptek: Yeah, we probably should |
15:41:44 | * | silvernode joined #nim |
15:47:15 | * | Romanson joined #nim |
15:48:43 | Araq | disruptek, no but you can use |
15:49:11 | Araq | when not defined(nimHasSinkInference): {.pragma nosinks.} |
15:49:31 | FromGitter | <alehander92> dom96 what would you want to add to nimkernel? |
15:50:06 | FromGitter | <alehander92> if I manage to port from tutorials all that gdt/idt stuff to a library, would you want to reuse it there? |
15:51:03 | FromGitter | <alehander92> i dont want to add stuff directly to nimkernel as i want different toy ones showcasing different stuff |
15:55:29 | * | solitudesf joined #nim |
16:09:46 | * | abm quit (Quit: Leaving) |
16:17:23 | zacharycarter | https://www.twitch.tv/zachary_carter |
16:17:26 | zacharycarter | stream is up |
16:19:23 | zacharycarter | nevermind need to fix encoder settings |
16:19:49 | disruptek | doh |
16:20:51 | zacharycarter | obs was eating like 200% cpu |
16:23:28 | zacharycarter | can you hear anything disruptek? |
16:23:48 | disruptek | yeah, i'm just too lazy to type. 😁 |
16:25:07 | FromDiscord | <Rika> Whatcha streamin |
16:25:20 | zacharycarter | game development |
16:39:09 | FromGitter | <alehander92> okk |
16:39:48 | Prestige | Nice, watching |
16:40:05 | FromGitter | <alehander92> i am going to stream after eating |
16:40:18 | FromGitter | <alehander92> is this vscode or vim |
16:40:50 | Prestige | looks like kak |
16:40:56 | leorize[m] | it's kakoune |
16:41:08 | FromGitter | <alehander92> oh nice |
16:41:53 | FromGitter | <alehander92> hm, tasks do look useful |
16:41:55 | FromGitter | <alehander92> i am a bit lazy |
16:41:56 | FromGitter | <alehander92> for them |
16:42:39 | * | Ven`` quit (Quit: Textual IRC Client: www.textualapp.com) |
16:43:42 | Prestige | havent tried kakoune, anyone have experience vs. vim? |
16:45:22 | Prestige | zacharycarter: your mic is a tad quiet |
16:46:20 | FromDiscord | <clyybber> I'm using kakoune |
16:56:22 | * | ptdel joined #nim |
16:56:56 | FromGitter | <alehander92> wow a dog |
16:57:20 | FromGitter | <alehander92> wooof woof , well not sure if i agree |
16:57:53 | FromGitter | <alehander92> a nice scene :D |
17:00:05 | FromGitter | <alehander92> https://www.twitch.tv/alehander42/ |
17:00:20 | FromGitter | <alehander92> ok i am going to stream a bit about learning osdev |
17:00:30 | disruptek | sweet. |
17:05:00 | * | dddddd quit (Remote host closed the connection) |
17:16:38 | * | solitudesf quit (Remote host closed the connection) |
17:17:49 | * | solitudesf joined #nim |
17:19:44 | * | silvernode quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
17:22:03 | Araq | alehander92: read your chat |
17:26:33 | dom96 | alehander42: dunno, maybe play around with implementing more things |
17:28:40 | shashlick | Araq: is it fair to say that C identifiers with leading underscores should not be wrapped? |
17:31:00 | shashlick | at least types |
17:31:03 | Araq | why not? C is full of underscores |
17:32:52 | shashlick | so its not C's hack for private names |
17:39:33 | Araq | no, it's just usual C code |
17:40:15 | * | fredrikhr joined #nim |
17:45:12 | * | narimiran quit (Remote host closed the connection) |
17:45:40 | shashlick | okay cool |
17:48:42 | * | narimiran joined #nim |
17:52:40 | * | waleee-cl joined #nim |
17:55:19 | FromGitter | <alehander92> what does cadey's vm do |
17:55:24 | FromGitter | <alehander92> disruptek |
17:56:23 | Cadey | what did i do now |
18:07:05 | FromGitter | <alehander92> well |
18:07:12 | FromGitter | <alehander92> somebody told me something about a cadey vm |
18:07:29 | Cadey | who is that someone lol |
18:07:34 | disruptek | me |
18:07:49 | FromGitter | <alehander92> of course |
18:08:19 | FromGitter | <alehander92> basically |
18:08:51 | FromGitter | <alehander92> we were talking about something like interpreting nim |
18:09:05 | * | Senketsu joined #nim |
18:13:34 | Cadey | i made a VM? |
18:13:48 | Cadey | did i get out of sync with time again |
18:16:44 | FromDiscord | <Recruit_main707> `result[0..^2]` this gives me all the string except the last character right? |
18:17:25 | * | BohlAdmin joined #nim |
18:17:39 | narimiran | there's an easy way to find out ;) |
18:17:42 | * | BohlAdmin quit (Quit: I used to think I was indecisive, but now I'm not too sure.) |
18:18:12 | FromDiscord | <Recruit_main707> !eval echo("abcde"[0..^2]) |
18:18:14 | NimBot | abcd |
18:20:36 | * | BohlAdmin joined #nim |
18:23:55 | * | jds_dizzy_ joined #nim |
18:23:55 | * | solitudesf- joined #nim |
18:24:45 | jds_dizzy_ | Anyone know how to add path options to vscode linter |
18:25:58 | * | solitudesf quit (Ping timeout: 260 seconds) |
18:29:13 | * | Romanson quit (Quit: Connection closed for inactivity) |
18:29:33 | FromGitter | <alehander92> awesome |
18:29:38 | FromGitter | <alehander92> string and seq-s work for me |
18:29:41 | FromGitter | <alehander92> Yardanico |
18:29:48 | FromGitter | <alehander92> in qemu with gc:arc |
18:39:39 | FromGitter | <bedwardly-down> Afternoon, all. You guys still trying to get the toy kernel to build properly? |
18:39:57 | FromDiscord | <Recruit_main707> with arc and os:any iirc |
18:44:06 | * | Senketsu quit (Quit: WeeChat 2.8) |
18:46:40 | * | PMunch joined #nim |
19:00:15 | FromGitter | <alehander92> it does for me |
19:01:38 | FromGitter | <alehander92> i streamed about it :D https://www.twitch.tv/videos/608175538 but its very chaotic brandon |
19:01:47 | PMunch | Phew, spent almost all day setting up my new monitors :S |
19:02:30 | * | FromDiscord <Recruit_main707> **light theme** |
19:02:53 | Prestige | PMunch: What did you get? |
19:03:01 | FromGitter | <alehander92> i love light themes :D |
19:03:11 | FromDiscord | <Recruit_main707> being Bytes of type []bytes in go: |
19:03:11 | FromDiscord | <Recruit_main707> b.Bytes != nil |
19:03:11 | FromDiscord | <Recruit_main707> how would this be done in nim?? |
19:03:54 | PMunch | Prestige, nothing fancy, just some old monitors I had lying around. But they are a significant upgrade from my 1680x1050 monitors |
19:04:01 | PMunch | These are 1920x1200 |
19:04:30 | PMunch | But mostly it was because I just got a new graphics card, and it didn't have more than one DVI port, and my old screens only had DVI input |
19:04:43 | PMunch | So I needed to switch in order to be able to connect all three monitors |
19:04:54 | * | jjido joined #nim |
19:05:33 | * | Jesin quit (Quit: Leaving) |
19:05:53 | Prestige | Nice upgrade. I have another one coming in next week |
19:06:50 | Prestige | PMunch: about nimlsp, would you have time to voice chat about it? |
19:07:10 | FromDiscord | <Recruit_main707> (just in case someone was gonna answer me, it doesnt matter anymore) |
19:07:58 | FromGitter | <alehander92> Recruit |
19:08:07 | FromDiscord | <Recruit_main707> ye? |
19:08:11 | FromGitter | <alehander92> is bytes a sequence |
19:08:27 | FromDiscord | <Recruit_main707> in nim, yes |
19:08:50 | FromGitter | <alehander92> zacharycarter sorry for not watching/interrupting :( whats the basic plan for frag in the future |
19:08:58 | FromDiscord | <Recruit_main707> but its really not necesary, dont worry :) |
19:09:06 | FromGitter | <alehander92> Recruit well whats the logical |
19:09:15 | FromGitter | <alehander92> yeah usually there is some sense to check eg empty |
19:09:33 | PMunch | Prestige, sure |
19:09:39 | FromGitter | <russmack> Anyone had luck getting vim tagbar to work with nim? |
19:10:35 | Prestige | PMunch: pm me whenever, I'm free through till Monday |
19:11:02 | PMunch | We can do it right now |
19:11:05 | FromDiscord | <Recruit_main707> i wonder... can you pm the gitterirc bot??? |
19:11:16 | PMunch | Just give me a sec to make sure my mic is working properly |
19:11:37 | Prestige | ah in a work call for about 50 more mins then I'm free, sorry |
19:11:40 | FromGitter | <alehander92> so |
19:11:44 | FromGitter | <alehander92> i want to generate asm |
19:11:46 | FromGitter | <alehander92> with a macro |
19:11:52 | FromGitter | <alehander92> and output a file as part of my build |
19:11:58 | FromGitter | <alehander92> do people do this |
19:12:09 | FromGitter | <alehander92> maybe i need to just write a normal program to do it |
19:12:16 | FromGitter | <alehander92> both seem good |
19:12:27 | FromDiscord | <Recruit_main707> > do people do this |
19:12:27 | FromDiscord | <Recruit_main707> only suicidal people probably |
19:12:41 | FromGitter | <alehander92> come on man its just a loop with some text :D |
19:13:05 | FromGitter | <alehander92> to generate stuff like https://github.com/cfenollosa/os-tutorial/blob/master/18-interrupts/cpu/interrupt.asm#L71 |
19:13:13 | FromDiscord | <Recruit_main707> its just... what a dangerous sentence when programming :p |
19:13:30 | FromDiscord | <Recruit_main707> you should try nevertheless |
19:14:03 | PMunch | Prestige, no problem, my mic seems to be totally messed up ATM.. |
19:14:18 | Prestige | Kk |
19:14:35 | * | Jesin joined #nim |
19:16:45 | FromGitter | <bedwardly-down> I saw there's a Twitch room for this gitter. Does that mean the language gets streamed on a regular basis? |
19:17:10 | FromDiscord | <Recruit_main707> its starting to become a trend |
19:17:40 | FromDiscord | <Recruit_main707> disruptek for instance usually streams while he codes |
19:17:49 | disruptek | ~stream |
19:17:49 | disbot | stream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek |
19:18:22 | FromGitter | <bedwardly-down> I haven't see mumble in forever. :O |
19:18:27 | PMunch | Yeah there are a couple of people who stream from time to time |
19:19:13 | FromGitter | <bedwardly-down> I haven't streamed in forever but am looking to get back into that myself. Thanks. :D |
19:19:46 | * | BohlAdmin left #nim (#nim) |
19:22:23 | FromGitter | <alehander92> wow i found a greatly expressed question about os multitasking on stack overflow |
19:22:31 | FromGitter | <alehander92> and who is the author? andrea ferretti |
19:22:33 | FromGitter | <alehander92> this man can right |
19:22:35 | FromGitter | <alehander92> write* |
19:22:41 | FromGitter | <alehander92> obviously i barely write write |
19:26:20 | * | jds_dizzy_ quit (Remote host closed the connection) |
19:27:08 | FromGitter | <bedwardly-down> I joined disruptek's stream but can't do anything even after following him? O.o |
19:27:33 | FromGitter | <alehander92> you can watch! |
19:28:02 | FromGitter | <alehander92> do you want to talk on the strem? |
19:28:08 | FromGitter | <alehander92> you need to join mumble too |
19:30:44 | * | ptdel quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
19:31:25 | * | solitudesf- quit (Ping timeout: 264 seconds) |
19:33:17 | * | NimBot joined #nim |
19:37:51 | FromDiscord | <Recruit_main707> nested is a keyword in nim?? |
19:38:16 | FromDiscord | <Recruit_main707> `undeclared field: 'nested' for type system.int [declared in C:\Program Files\nim-1.2.0\lib\system\basic_types.nim(2, 3)]` |
19:38:53 | FromDiscord | <Recruit_main707> nvm |
19:39:22 | FromDiscord | <Recruit_main707> i didnt know you had to separate `using` args of normal ones with ; |
19:41:51 | FromGitter | <alehander92> oooh yeah |
19:41:52 | FromGitter | <alehander92> sorry |
19:42:12 | FromGitter | <alehander92> you know you can write |
19:42:14 | FromGitter | <alehander92> a, b: int |
19:42:19 | FromGitter | <alehander92> even if you dont use using? |
19:48:02 | * | leorize joined #nim |
19:51:13 | shashlick | wth is the intention of this code - https://github.com/lattera/glibc/blob/master/bits/confname.h#L24 |
19:51:52 | shashlick | why an enum val - `_PC_LINK_MAX` and then a #define of the same |
19:52:35 | PMunch | Prestige, here's what my new setup looks like: https://uploads.peterme.net/lowered.jpg https://uploads.peterme.net/raised.jpg |
19:53:41 | Prestige | Nice! I could really use a third monitor at timeslol |
19:54:16 | leorize | shashlick: welcome to the amazing world of glibc :P |
19:54:27 | leorize | also that's not the up-to-date source |
19:54:37 | * | MightyJoe joined #nim |
19:55:02 | * | cyraxjoe quit (Ping timeout: 256 seconds) |
19:55:22 | PMunch | Prestige, I've got two spares now :P |
19:55:50 | shashlick | yep, but at least i found a bug in nimterop |
19:57:37 | FromDiscord | <Never Listen To Beef> Pmunch living life dangerously with that 3d printer at his feet |
19:58:06 | PMunch | Haha, I don't run it under there |
19:58:11 | PMunch | I pull it out when it's in use |
19:58:14 | FromDiscord | <Never Listen To Beef> I can tell it's a shelf |
19:58:20 | FromDiscord | <Never Listen To Beef> Never seen a floor shelf before though |
19:58:24 | PMunch | A shelf? |
19:58:25 | FromDiscord | <Recruit_main707> have i got it right? |
19:58:25 | FromDiscord | <Recruit_main707> https://cdn.discordapp.com/attachments/371759389889003532/705870765244809336/unknown.png |
19:58:37 | FromDiscord | <Never Listen To Beef> You have stuff put on the build plate |
19:59:08 | PMunch | Oh, that's just the cables and filament roller for the printer |
19:59:15 | FromDiscord | <Never Listen To Beef> ah |
19:59:16 | PMunch | I actually use it fairly often |
19:59:26 | PMunch | The brown thing to the left of my computer is my shelf |
19:59:36 | FromDiscord | <Never Listen To Beef> yea i was going to say i |
19:59:43 | FromDiscord | <Never Listen To Beef> i'd bolt it to said brown thing |
20:00:09 | FromDiscord | <Rika> @Recruit_main707 p.much yeah |
20:02:15 | * | MightyJoe quit (Ping timeout: 240 seconds) |
20:04:17 | PMunch | The glory that is the shelf: https://uploads.peterme.net/openshelf.jpg |
20:04:30 | PMunch | How would I bolt it to that? |
20:04:41 | * | cyraxjoe joined #nim |
20:04:46 | PMunch | And why? The whole point is for it to stay hidden while I'm not using it.. |
20:05:04 | PMunch | Recruit_main707, you're kinda right, but it's a bit oddly worded |
20:05:05 | FromDiscord | <Never Listen To Beef> idk im a clutz and would end up kicking that printer |
20:05:18 | PMunch | Haha, I don't kick it that often |
20:05:33 | FromDiscord | <Never Listen To Beef> But bolting wouldnt be hard roll that out drill a few holes then pass some bolts through |
20:07:08 | PMunch | But where? On the top? |
20:07:13 | FromDiscord | <Never Listen To Beef> yea |
20:07:37 | FromDiscord | <Never Listen To Beef> Clearly not on the top of the roll out organizer since it doesnt have one 😛 |
20:10:24 | PMunch | It's waaay to tall for that |
20:10:33 | PMunch | And it wouldn't hide it at all :P |
20:11:39 | * | MightyJoe joined #nim |
20:12:13 | FromDiscord | <Never Listen To Beef> Hiding stuff is for nerds, and we're waaay off nim 😄 |
20:12:52 | PMunch | Being off-topic here is fine as long as no one wants to talk Nim :) |
20:13:14 | * | cyraxjoe quit (Ping timeout: 256 seconds) |
20:15:06 | * | ptdel joined #nim |
20:15:44 | FromDiscord | <Rika> f |
20:15:57 | FromDiscord | <Rika> "who likes nim anyway smh smh" |
20:19:22 | PMunch | Rika, huh? |
20:22:44 | * | cyraxjoe joined #nim |
20:22:46 | * | fredrikhr quit (Read error: Connection reset by peer) |
20:24:08 | * | fredrikhr joined #nim |
20:24:14 | * | MightyJoe quit (Ping timeout: 240 seconds) |
20:25:03 | FromDiscord | <Rika> "no one wants to talk Nim" can be interpreted as "no one likes Nim" in a way |
20:26:52 | PMunch | Oh, haha :P |
20:27:05 | PMunch | brb |
20:27:06 | * | PMunch quit (Quit: leaving) |
20:29:24 | * | MightyJoe joined #nim |
20:30:46 | * | PMunch joined #nim |
20:31:07 | * | cyraxjoe quit (Ping timeout: 260 seconds) |
20:31:32 | * | PMunch quit (Remote host closed the connection) |
20:31:46 | * | xet7 quit (Quit: Leaving) |
20:34:37 | * | PMunch joined #nim |
20:36:35 | * | narimiran quit (Quit: leaving) |
20:36:50 | PMunch | Damn it.. |
20:37:44 | PMunch | After my jigging around with the computer I have this horrible base hum in my front mic.. |
20:37:51 | * | xet7 joined #nim |
20:37:54 | PMunch | And I don't really know why.. |
20:38:00 | Prestige | Hmm :/ |
20:38:08 | Prestige | That's annoying |
20:38:12 | PMunch | Sound card didn't fix it :P |
20:38:37 | PMunch | Although I didn't do a lot of debugging with it |
20:38:49 | PMunch | I discovered that I can connect the front microphone to it |
20:39:00 | PMunch | But it didn't seem to have drivers.. |
20:40:39 | FromGitter | <bedwardly-down> Rika, that makes sense |
20:41:49 | FromDiscord | <Rika> bedwardly-down what |
20:42:39 | * | jjido quit (Ping timeout: 272 seconds) |
20:48:31 | stefantalpalaru | Have you ever seen this statx.h CPP error when building Nim on Ubuntu 19.10? https://discordapp.com/channels/613988663034118151/616299964242460682/705880182124445697 |
20:49:17 | FromGitter | <bedwardly-down> `**<FromDiscord>** <Rika> "no one wants to talk Nim" can be interpreted as "no one likes Nim" in a way` Rika |
20:50:55 | * | cyraxjoe joined #nim |
20:51:49 | FromGitter | <Bennyelg> How can I do something like this: ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=5eac8be57975db7ebfdb7f15] |
20:51:50 | FromGitter | <Bennyelg> type ⏎ ⏎ ```Result* = ref object ⏎ data*: any ⏎ message*: Option[string]``` [https://gitter.im/nim-lang/Nim?at=5eac8be59f0c955d7d9b8e71] |
20:52:54 | * | MightyJoe quit (Ping timeout: 260 seconds) |
20:55:04 | * | xcm quit (Remote host closed the connection) |
20:57:39 | * | xcm joined #nim |
20:59:01 | * | MightyJoe joined #nim |
21:00:54 | * | cyraxjoe quit (Ping timeout: 260 seconds) |
21:01:31 | * | cyraxjoe joined #nim |
21:03:42 | * | MightyJoe quit (Ping timeout: 260 seconds) |
21:12:53 | * | lritter quit (Ping timeout: 256 seconds) |
21:20:47 | FromDiscord | <Recruit_main707> any python users that can confirm me that ~ is just bitwise not and therefore == nim's not? |
21:22:19 | Yardanico | in nim "not", "and" can be used for both booleans and bitwise operations |
21:22:32 | Yardanico | also << and >> are shl and shr respectively |
21:22:45 | FromDiscord | <Recruit_main707> so, yes? |
21:23:56 | FromGitter | <enthus1ast> @Bennyelg afaik this is not directly possible; you could consider Object variants or serialize the data |
21:27:10 | zacharycarter | stream is back online: https://www.twitch.tv/zachary_carter |
21:28:14 | FromGitter | <enthus1ast> what are you building zacharycarter? |
21:28:23 | zacharycarter | I'm working on a game engine |
21:28:36 | zacharycarter | specically right now, hot reloading and plugins |
21:28:48 | FromDiscord | <treeform> is the game engine in nim? |
21:28:51 | zacharycarter | yes |
21:29:04 | FromGitter | <enthus1ast> considered entity component system? |
21:29:07 | FromDiscord | <Recruit_main707> Pog |
21:29:09 | zacharycarter | yeah I'll be doing one |
21:30:04 | FromDiscord | <treeform> your microphone has static, like you are driving down the road. |
21:30:05 | FromGitter | <enthus1ast> i've build one 2 days ago :) |
21:30:41 | disruptek | he's on mumble if you wanna chat. i'm watching his stream. |
21:31:11 | FromDiscord | <treeform> mumble link? |
21:31:30 | Yardanico | ~stream |
21:31:31 | disbot | stream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) |
21:31:31 | Yardanico | same as always |
21:33:17 | FromDiscord | <treeform> I have connected I don't hear anything |
21:33:58 | Yardanico | you sure? |
21:34:06 | Yardanico | maybe you're deafened (I mean in mumble) |
21:35:26 | * | zacharycarter quit (Ping timeout: 260 seconds) |
21:38:51 | FromDiscord | <Recruit_main707> `alignsize and size - 1` how does the compiler interpret this: |
21:38:51 | FromDiscord | <Recruit_main707> `(alignsize and size) - 1` or `alignsize and (size - 1)` |
21:38:51 | FromDiscord | <Recruit_main707> ? |
21:39:08 | Yardanico | what are the types of alignsize, size? |
21:39:21 | FromDiscord | <Recruit_main707> integrers |
21:39:46 | FromDiscord | <Recruit_main707> integers* |
21:39:52 | FromGitter | <alehander92> yardanico |
21:39:57 | Yardanico | ? |
21:39:58 | FromGitter | <alehander92> btw i think you dont need those changes |
21:40:03 | Yardanico | why? |
21:40:03 | FromGitter | <alehander92> to sources in your kernel |
21:40:10 | Yardanico | which ones? |
21:40:13 | FromGitter | <alehander92> because i managed to build mine without those |
21:40:20 | Yardanico | ??? |
21:40:20 | FromGitter | <alehander92> the manual changes to nim sources |
21:40:22 | FromGitter | <alehander92> in the readme |
21:40:31 | Yardanico | that doesn't work for me with --os:any --gc:arc |
21:40:33 | Yardanico | without these changes |
21:40:50 | FromGitter | <alehander92> https://github.com/Yardanico/JackOS/#notes |
21:40:55 | Yardanico | yes I understand |
21:41:00 | Yardanico | it doesn't work for me without them on linux |
21:41:00 | FromGitter | <alehander92> do you pass all needed options |
21:41:04 | FromGitter | <alehander92> but it works for me hm |
21:41:18 | Yardanico | see https://github.com/Yardanico/JackOS/blob/master/nim.cfg |
21:41:55 | FromGitter | <alehander92> wow so many |
21:41:59 | FromGitter | <alehander92> my approach is different |
21:42:04 | Yardanico | well do you have source? :P |
21:42:04 | FromGitter | <alehander92> i do `nim c --os:any --gc:arc -d:danger --compileOnly:on -d:StandaloneHeapSize:4096 --exceptions:goto -d:nimNoLibc -d:nimNoSignalHandler --noMain --nimcache:build start.nim` |
21:42:19 | Yardanico | --exceptions:goto is not needed here btw |
21:42:23 | FromGitter | <alehander92> and then just link separately |
21:42:23 | Yardanico | --gc:arc defaults to goto anyway |
21:42:30 | FromGitter | <alehander92> and it works |
21:43:41 | Yardanico | well I'm really not sure, maybe because jackos fork uses some strings and stuff |
21:43:45 | FromGitter | <alehander92> hm i dont use stackTrace and boundChecks |
21:43:50 | FromGitter | <alehander92> but i also usd strings and seq |
21:44:23 | Yardanico | what about $ for ints? |
21:44:40 | Yardanico | for me seqs don't work even without these stackTrace and boundChecks |
21:44:43 | Yardanico | so I request your source :P |
21:44:56 | Yardanico | maybe jackos doesn't initialize something correctly |
21:45:14 | FromGitter | <alehander92> okk |
21:47:03 | FromGitter | <alehander92> https://github.com/alehander92/lodka |
21:47:36 | * | PMunch quit (Quit: leaving) |
21:49:02 | Yardanico | also btw panicoverride seems to be not included with --os:any |
21:49:35 | Yardanico | can you try creating a seq and appending to it at runtime? |
21:50:09 | FromGitter | <alehander92> appending |
21:50:09 | FromGitter | <alehander92> ok |
21:50:15 | Yardanico | like |
21:50:31 | Yardanico | var a = @[1, 2, 3]; a.add 3; consoleWriteNl($a[3]) |
21:51:22 | Yardanico | and btw you didn't have to patch nim because you added your custom headers :P |
21:51:26 | Yardanico | with stdio and etcv |
21:51:28 | Yardanico | etc* |
21:53:21 | Yardanico | ./c/nimbase.h:261:10: fatal error: limits.h: No such file or directory hm |
21:53:50 | FromGitter | <alehander92> hmm appending works |
21:53:58 | FromGitter | <alehander92> but $integer |
21:54:04 | FromGitter | <alehander92> depends on __divdi3 |
21:54:07 | Yardanico | ah yes |
21:54:10 | FromGitter | <alehander92> which i implement now but wrongly |
21:54:12 | Yardanico | you need to link with libgcc |
21:54:19 | Yardanico | it's okay to do that for kernels btw |
21:54:29 | Yardanico | https://wiki.osdev.org/Libgcc#How_to_link_with_libgcc |
21:54:32 | FromGitter | <alehander92> i think its easier to add it in your own libc |
21:54:40 | Yardanico | well it's not really a part of libc |
21:54:46 | Yardanico | it's gcc's own builtins |
21:55:31 | Yardanico | division of 64-bit integers on 32-bit CPUs uses __divdi3 afaik |
21:55:32 | FromGitter | <alehander92> hmm |
21:55:38 | FromGitter | <alehander92> but i *can* define it myself |
21:55:46 | FromGitter | <alehander92> i wonder if i can define it correctly |
21:55:51 | FromGitter | <alehander92> or this doesnt begin to make sense |
21:56:42 | Yardanico | also did you get an error with limits.h? |
21:56:53 | Yardanico | for some reason I get an error that nim can't find this header |
21:56:58 | Yardanico | I'm using build_nim.sh |
21:57:11 | Yardanico | ah I see the problem |
21:57:15 | Yardanico | you have hardcoded paths :P |
21:57:45 | FromGitter | <alehander92> oh yes sorry |
21:57:46 | Yardanico | or not hm |
21:57:55 | Yardanico | it fails at nim step |
21:57:56 | FromGitter | <alehander92> i have for the ~/opt/cross/.. |
21:57:57 | FromGitter | <alehander92> stuff |
21:57:59 | Yardanico | ah wait no |
21:58:05 | FromGitter | <alehander92> i should provide a setting for that |
21:58:56 | FromGitter | <alehander92> but i dont have the limits.h problem i think |
21:59:52 | Yardanico | ah -nostdinc |
21:59:56 | Yardanico | it works if I don't pass that |
22:00:00 | Yardanico | and I don't think you need to pass that |
22:00:49 | * | solitudesf quit (Ping timeout: 264 seconds) |
22:02:17 | Yardanico | hmm maybe I should try booting raw kernel without grub too |
22:02:19 | Yardanico | in jackos fork |
22:03:10 | FromGitter | <alehander92> no idea if this changes anything |
22:05:06 | * | PMunch joined #nim |
22:05:26 | FromGitter | <alehander92> but i plan to port the interrupt / idt stuff from https://github.com/cfenollosa/os-tutorial/tree/master/20-interrupts-timer/cpu |
22:07:32 | * | xcm quit (*.net *.split) |
22:07:32 | * | tlanger quit (*.net *.split) |
22:07:32 | * | dv^_^ quit (*.net *.split) |
22:07:32 | * | qbradley quit (*.net *.split) |
22:07:33 | * | vqrs quit (*.net *.split) |
22:07:33 | * | voltist quit (*.net *.split) |
22:07:33 | * | FromGitter quit (*.net *.split) |
22:07:52 | * | ptdel quit (*.net *.split) |
22:07:52 | * | chemist69 quit (*.net *.split) |
22:07:52 | * | oprypin quit (*.net *.split) |
22:07:52 | * | D_ quit (*.net *.split) |
22:07:52 | * | salotz[m] quit (*.net *.split) |
22:07:52 | * | qwertfisch quit (*.net *.split) |
22:07:52 | * | sacredfrog quit (*.net *.split) |
22:07:52 | * | matti quit (*.net *.split) |
22:07:52 | * | go|dfish quit (*.net *.split) |
22:07:52 | * | drewr quit (*.net *.split) |
22:07:52 | * | oprypin joined #nim |
22:07:52 | * | ptdel joined #nim |
22:07:52 | * | qbradley joined #nim |
22:07:53 | * | FromGitter joined #nim |
22:07:54 | * | salotz[m] joined #nim |
22:08:01 | * | D_ joined #nim |
22:08:10 | * | chemist69 joined #nim |
22:08:15 | * | go|dfish joined #nim |
22:08:25 | * | matti joined #nim |
22:08:35 | * | matti quit (Changing host) |
22:08:35 | * | matti joined #nim |
22:08:47 | * | sacredfrog joined #nim |
22:10:07 | * | vqrs joined #nim |
22:10:19 | * | xcm joined #nim |
22:10:38 | * | qwertfisch joined #nim |
22:10:55 | * | dom96 quit (Ping timeout: 246 seconds) |
22:11:54 | * | sentreen quit (Ping timeout: 240 seconds) |
22:12:47 | * | dv^_^ joined #nim |
22:13:02 | * | dom96 joined #nim |
22:13:02 | * | dom96 quit (Changing host) |
22:13:02 | * | dom96 joined #nim |
22:13:45 | FromDiscord | <codic> Can nimpy use httpclient (https://nim-lang.org/docs/httpclient.html) ? |
22:13:45 | FromDiscord | <codic> Also what about one of the websocket libraries (treeform's ws https://github.com/treeform/ws and niv's websocket.nim https://github.com/niv/websocket.nim) |
22:13:58 | Yardanico | @codic why wouldn't it? |
22:14:02 | Yardanico | I mean httpclient with nimpy |
22:14:45 | FromDiscord | <codic> just wanted to make sure, I was gonna write a `requests` alternative with nimpu |
22:14:49 | FromDiscord | <codic> nimpy* |
22:14:59 | disruptek | that's been done. |
22:15:00 | * | zacharycarter joined #nim |
22:15:03 | FromDiscord | <codic> i know |
22:15:04 | zacharycarter | stream's back up |
22:15:14 | FromDiscord | <codic> just for fun haha |
22:15:55 | FromDiscord | <codic> also a websockets thing is something i wanted |
22:16:31 | FromDiscord | <codic> so would one of those work? |
22:16:45 | Yardanico | nimpy is not specific to some subset of nim |
22:17:02 | * | sentreen joined #nim |
22:18:19 | FromDiscord | <codic> yeah but i thought some libraries might not work |
22:18:23 | Yardanico | why? |
22:20:02 | FromDiscord | <codic> same reason why {.exportc.} doesn't translate tables to ruby hashes |
22:20:21 | Yardanico | that doesn't mean it "wouldn't" work |
22:20:27 | Yardanico | you'll just have to interface between nim and python types |
22:20:30 | Yardanico | yourself |
22:21:20 | FromDiscord | <codic> oh? |
22:21:29 | FromDiscord | <codic> faster-than-requests doesn't eem to interface |
22:22:23 | FromDiscord | <KingDarBoja> Hi Yard |
22:22:30 | FromDiscord | <Recruit_main707> when does this error appear?template/generic instantiation of from here |
22:23:36 | Yardanico | that's not the fulle rror |
22:23:40 | Yardanico | show us the full error first :) |
22:24:15 | FromDiscord | <Recruit_main707> template/generic instantiation of `WriteVal` from here |
22:24:19 | Yardanico | full |
22:24:25 | Yardanico | that's not "full" :P |
22:24:31 | FromDiscord | <Recruit_main707> then what |
22:24:36 | Yardanico | full stack trace |
22:25:31 | FromDiscord | <Recruit_main707> |
22:25:31 | FromDiscord | <Recruit_main707> https://cdn.discordapp.com/attachments/371759389889003532/705907783106822174/unknown.png |
22:25:42 | Yardanico | uhh that's not the one |
22:25:45 | Yardanico | I meant from the compiler itself |
22:25:50 | * | drewr joined #nim |
22:25:57 | Yardanico | in terminal |
22:27:10 | FromDiscord | <Recruit_main707> https://play.nim-lang.org/#ix=2ko9 |
22:27:10 | FromDiscord | <Recruit_main707> full error of running check? |
22:27:20 | Yardanico | "Error: expression 'littleEndian64' cannot be called" is the error itself |
22:27:30 | Yardanico | and instantiations just show how the code path ended here |
22:27:56 | Yardanico | also 'Error: undeclared identifier: 'littleEndian64'" |
22:28:07 | Yardanico | did you forget to import endians? |
22:28:15 | FromDiscord | <Recruit_main707> but littleEndian is part of the stdlib isnt it? |
22:28:17 | Yardanico | no? |
22:28:20 | Yardanico | it's in "endians" module |
22:28:23 | Yardanico | it's not in system |
22:28:56 | Yardanico | also if you use littleEndian64 in your templates in builder.nim and then call these templates in good_table.nim you might need to bind littleEndian64 in these templates |
22:29:00 | Yardanico | or "export endians" |
22:29:19 | FromDiscord | <Recruit_main707> this thing always confuses me |
22:29:19 | FromDiscord | <Recruit_main707> https://cdn.discordapp.com/attachments/371759389889003532/705908737650589816/unknown.png |
22:29:33 | Yardanico | why? |
22:30:10 | FromDiscord | <Recruit_main707> why would standar library appear there |
22:30:12 | * | liblq-dev quit (Ping timeout: 258 seconds) |
22:30:14 | Yardanico | ?????????????? |
22:30:30 | Yardanico | it's a link to https://nim-lang.org/docs/lib.html |
22:30:42 | FromDiscord | <Recruit_main707> i know, when i see it i just thing that module is part of it |
22:30:45 | Yardanico | endians is a part of stdlib but stdlib modules are not magically imported |
22:30:51 | Yardanico | except system |
22:30:53 | Yardanico | and threads |
22:30:53 | zacharycarter | back again |
22:31:28 | FromDiscord | <Recruit_main707> ok, thanks and sorry for the dumb questions :) |
22:32:30 | * | MyMind quit (Quit: WeeChat 2.8) |
22:38:17 | FromDiscord | <KingDarBoja> RIP IRC |
22:38:36 | Yardanico | ? |
22:38:43 | FromDiscord | <Recruit_main707> bruh moment |
22:38:58 | Yardanico | @alehander92 seems like I managed to make JackOS work with seqs too :D |
22:39:05 | Yardanico | basically I used your build_nim.sh instead of a make file lmao |
22:41:54 | FromGitter | <alehander92> love it! |
22:42:00 | FromGitter | <alehander92> i am trying to make jack os |
22:42:04 | FromGitter | <alehander92> run with the makefile! |
22:43:49 | Yardanico | although cpuinfo from jackos still does't work, maybe there's some error with inline assembly there |
22:48:48 | * | Trustable quit (Remote host closed the connection) |
22:50:08 | FromGitter | <alehander92> ok |
22:50:15 | FromGitter | <alehander92> it builds with makefile now |
22:50:33 | FromGitter | <alehander92> but it just shows me blue screen |
22:50:41 | Yardanico | ye that's expected with current commits |
22:50:55 | Yardanico | now with some config changes i can do seqs stuff somehow |
22:51:18 | FromDiscord | <Rika> how much of a performance hit is accessing heap instead of stack? (ref object vs object)? |
22:51:30 | FromGitter | <alehander92> Yardanico ok |
22:51:33 | FromGitter | <alehander92> so basically fix |
22:51:36 | FromGitter | <alehander92> OBJECT_FILES |
22:51:41 | FromGitter | <alehander92> because they are hardcoded currently |
22:51:46 | Yardanico | yeah I know |
22:51:51 | FromGitter | <alehander92> i think one can automatically get them from the *.o names |
22:51:52 | Yardanico | I'll probably try to use nimscript though :P |
22:51:57 | FromGitter | <alehander92> but i am not so good at makefiles |
22:52:02 | FromGitter | <alehander92> but makefiles do seem useful i admit |
22:52:12 | FromGitter | <alehander92> but otherwise thanks !!! |
22:52:17 | FromGitter | <alehander92> i now know of more options |
22:52:20 | FromGitter | <alehander92> and linkerexe |
22:52:31 | FromGitter | <alehander92> and can adapt this for my kernel |
22:52:49 | FromGitter | <alehander92> we can like join forces or something |
22:53:10 | Yardanico | I don't know osdev :P |
22:53:16 | FromGitter | <alehander92> but you can also do your own thing my ideas are very unreliable |
22:53:58 | FromGitter | <alehander92> yeah i plan on basically following some tutorials and doing unexpected stuff |
22:54:47 | Yardanico | also btw for stacktraces in your kernel there is some issue (maybe because of some problem with malloc and friends) |
22:54:56 | Yardanico | they produce some garbled output instead of proper ones |
22:55:32 | FromDiscord | <Rika> T_T |
22:57:03 | FromGitter | <alehander92> oh yeah i dont care for those yet |
22:57:14 | FromGitter | <alehander92> my c stubs are very very basic |
22:57:19 | FromGitter | <alehander92> many of them just to make it build |
22:57:53 | FromGitter | <alehander92> basically you're right: i probably need to decide if i want to write my own mini libc or build with stuff |
22:58:00 | FromGitter | <alehander92> but i want to depend on a minimal amount of stuff |
22:58:02 | Yardanico | write it in nim :P |
22:59:02 | FromDiscord | <bedwardly-down> Streaming with Wayland took forever to get working but i did my first nim test stream a little while ago. ☺️ |
22:59:22 | Yardanico | well with sway you just install wlrobs |
22:59:28 | Yardanico | add it to your obs plugins and then use scpy |
23:01:53 | FromDiscord | <bedwardly-down> Direktik helped me out with that, although, I didn’t realize that i was using the wrong stuff the entire time. 🤪 |
23:02:21 | FromDiscord | <bedwardly-down> The main tutorial doc for it misdirected so much |
23:03:51 | Yardanico | why? |
23:03:54 | Yardanico | I followed it too |
23:04:08 | Yardanico | in the readme it literally tells how to install it https://hg.sr.ht/~scoopta/wlrobs |
23:04:17 | Yardanico | "Building" and "Installing" |
23:06:15 | FromDiscord | <bedwardly-down> I was using the wrong plug-in. When i searched for Wayland obs, it pulled up a Wayland build of obs studio and a separate plugin from a George something |
23:06:45 | FromDiscord | <bedwardly-down> And that was the setup linked from Obs’s help docs |
23:08:23 | FromDiscord | <bedwardly-down> https://feaneron.com/2019/11/21/screencasting-with-obs-studio-on-wayland/ |
23:08:30 | Yardanico | well i didn't use that |
23:09:32 | FromDiscord | <bedwardly-down> I should have asked for more help with it. I may have to do the same for nim at this rate. 😛 |
23:10:00 | dom96 | le sigh #11912 |
23:10:00 | disbot | https://github.com/nim-lang/Nim/issues/11912 -- 3Add undiscardable pragma and forbid Futures from being discarded |
23:10:49 | shashlick | any ideas - https://github.com/genotrance/nimpcre/issues/3 |
23:10:52 | disbot | ➥ error: no matching function for call to 'pcre_free_study' ; snippet at 12https://play.nim-lang.org/#ix=2kox |
23:11:39 | FromDiscord | <bedwardly-down> dom96, :/ |
23:14:00 | FromDiscord | <exelotl> @Rika about your performance question, the cost of indirection depends on whether the object is in the CPU caches (i.e. it has been accessed recently or is near some data that has been accessed recently) |
23:14:10 | FromDiscord | <bedwardly-down> Does nim have anything like Promises in Javascript that guarantee that at some point an async call will happen during the lifecycle of an app? |
23:14:40 | dom96 | async await and futures? I guess |
23:15:24 | FromDiscord | <exelotl> @Rika this chapter is a good read if you wanna learn more about that http://gameprogrammingpatterns.com/data-locality.html - apologies if I'm telling you stuff you already know xD |
23:18:18 | FromDiscord | <codic> nim rules. |
23:19:20 | FromDiscord | <codic> It's actually a very pleasant experience to refactor *small parts* of python code to nim and use nimpy. it gives you small performance boosts. eventually you get to the point where most of your heavy computing is nim |
23:19:34 | FromDiscord | <codic> and then you be like 'why was my code slow before nim' |
23:19:49 | FromDiscord | <bedwardly-down> I'm reading that bug and the ones linked, dom. I noticed that one of the merges for the docs suggested only discarding when it's safe. How does someone brand new (like me) know what is and isn't safe in that context? |
23:20:20 | FromDiscord | <codic> waaaaaaaait https://nim-lang.org/ says string interpolation is evaluated at compile time |
23:20:37 | FromDiscord | <codic> But what if you have string interpoltion having a value from input? |
23:20:44 | FromDiscord | <codic> *polation |
23:20:47 | FromDiscord | <codic> *interpolation |
23:20:53 | FromDiscord | <codic> how can that be at compile time? |
23:21:47 | Yardanico | strformat |
23:21:53 | FromDiscord | <Rika> @exelotl you arent xd thanks |
23:22:05 | Yardanico | @codic well basically your format string is transformed into .add calls |
23:22:08 | FromDiscord | <Rika> though i think i'm prematurely optmizing at this point |
23:22:09 | Yardanico | at compile-time |
23:22:11 | Yardanico | and stuff like that |
23:23:14 | Yardanico | so I guess 64kb for the kernel with --gc:arc --os:any is ok :P (after stripping) |
23:24:21 | Yardanico | https://i.imgur.com/GVi1nYI.png a REAL sequence |
23:25:10 | FromDiscord | <Rika> what is that 👀 |
23:25:12 | FromDiscord | <codic> > @codic well basically your format string is transformed into .add calls |
23:25:16 | FromDiscord | <codic> Ohh that makes much more sense |
23:25:26 | Yardanico | JackOS (fork of nimkernel) |
23:25:29 | FromDiscord | <codic> I thought {variable} was replaced by the content of the variable hahaha |
23:25:37 | Yardanico | and I kinda made it work with --os:any --gc:arc |
23:26:23 | Yardanico | https://i.imgur.com/olB6Vpa.png |
23:26:28 | Yardanico | wait let me try something really crazy |
23:26:39 | FromDiscord | <KingDarBoja> I have a question, it is possible to get the list of properties of one type? |
23:33:10 | Yardanico | lmao |
23:33:16 | Yardanico | tables in kernel |
23:33:42 | FromDiscord | <codic> Does nim run on nim raspberry pi? |
23:33:45 | FromDiscord | <codic> Does nim run on raspberry pi? |
23:33:49 | Yardanico | yes of course |
23:33:54 | FromDiscord | <codic> oh, great |
23:34:02 | FromDiscord | <codic> what about the arduino |
23:34:20 | FromDiscord | <bedwardly-down> Yar, is that a boot screen? |
23:34:20 | FromDiscord | <bedwardly-down> Nice |
23:35:55 | FromDiscord | <codic> And how do I install nim on the pi? |
23:35:55 | FromDiscord | <codic> (And one last question 😢😢😢 does nim have bindings for the pi camera or would I have to write my own) |
23:36:41 | FromDiscord | <codic> or as a third option for the last question osproc.execProcess and raspistill/raspivid would work for *basic* operations |
23:38:04 | FromDiscord | <Recruit_main707> > what about the arduino |
23:38:04 | FromDiscord | <Recruit_main707> Yep |
23:38:36 | FromDiscord | <Recruit_main707> Yardanico: so they work?? |
23:38:42 | Yardanico | who? |
23:38:43 | FromDiscord | <KingDarBoja> Can I request a suggestion from you, Yardanicco? |
23:38:45 | Yardanico | tables? ofc |
23:39:25 | FromDiscord | <Recruit_main707> lmao, can you just do echo() ? |
23:39:40 | Yardanico | well if you declare it in your file - ofc |
23:39:47 | Yardanico | it'll shadow the system's own echo |
23:39:50 | Yardanico | maybe |
23:39:57 | FromDiscord | <codic> oh nice |
23:39:57 | FromDiscord | <codic> i'll just use osproc for the picamera. tryna get choosenim on the pi rn |
23:40:15 | FromDiscord | <codic> since the nim downloads page only shows x86/x86_64bit downloads |
23:40:38 | FromDiscord | <KingDarBoja> I am checking a source code function (which is in JS) and they use a keymap (a dictionary pretty much) to store the key of the AST kind and the value as the list of properties of that kind |
23:40:47 | FromDiscord | <Recruit_main707> Isn’t raspberry 64 bit? |
23:41:28 | FromDiscord | <codic> yeah but arm64 |
23:41:43 | FromDiscord | <KingDarBoja> I checked the same implementation on Go (KeyMap) and Python (Dictionary), so I guess I should use Tables module to do the same but here comes the question |
23:41:47 | Yardanico | @codic well you can compile from source |
23:41:52 | Yardanico | or use binary releases |
23:42:10 | Yardanico | https://github.com/nim-lang/nightlies/releases/tag/2020-04-28-version-1-2-dc3919b |
23:42:13 | FromDiscord | <Recruit_main707> > yeah but arm64 |
23:42:13 | FromDiscord | <Recruit_main707> So is my pc |
23:42:15 | Yardanico | linux_arm64 |
23:42:21 | Yardanico | @Recruit arm64 != amd64 |
23:42:30 | Yardanico | well you might be running an arm64 pc, sure, but that's kinda uncommon |
23:42:45 | FromDiscord | <Recruit_main707> Probably amd now that you say it |
23:42:48 | FromDiscord | <codic> choosenim won't work? |
23:42:51 | Yardanico | it would |
23:42:59 | Yardanico | but it'll compile from source |
23:43:04 | FromDiscord | <codic> fine with me |
23:43:37 | FromDiscord | <KingDarBoja> Is there a way to get each ast kind and create a key-value pair like I described? |
23:43:57 | FromDiscord | <KingDarBoja> I mean, set the type as the key and the properties as the value (a sequence I think) |
23:44:25 | Yardanico | it might work with typedesc , not sure :P |
23:45:19 | FromDiscord | <KingDarBoja> I only see name on typedesc |
23:45:57 | * | tane quit (Quit: Leaving) |
23:47:10 | FromDiscord | <KingDarBoja> Ah well, I will go the easy way and make them manually on a table lol |
23:48:52 | FromGitter | <alehander92> Yardanico niccce! |
23:50:57 | * | gangstacat quit (Ping timeout: 265 seconds) |
23:51:21 | FromGitter | <alehander92> dom96 disruptek i agree about the asyncCheck vs discard thing |
23:51:38 | FromGitter | <alehander92> that whole "you should read the docs" if the compiler can detect something doesnt make sense, it should just do it |
23:51:48 | FromGitter | <alehander92> too much overthinking imho |
23:51:52 | FromGitter | <alehander92> i agree with dom96 & |
23:51:54 | FromGitter | <alehander92> * |
23:52:04 | FromGitter | <alehander92> sorry, wanted to append to the first message |
23:54:05 | * | gangstacat joined #nim |
23:55:50 | * | fredrikhr quit (Ping timeout: 260 seconds) |