<< 01-05-2020 >>

00:10:17FromDiscord<codic> In nim, how would I write something like this c? `int test = *t;`
00:10:31FromDiscord<codic> Wait no
00:10:40FromDiscord<codic> i meant `int *t;`
00:14:05FromGitter<bung87> `ptr int`
00:14:13FromDiscord<codic> Where's the `t` in that
00:14:35FromDiscord<codic> Would it be `ptr int t`?
00:15:42FromDiscord<codic> or `ptr t int`?
00:15:45FromDiscord<codic> or `ptr t:int`?
00:15:54FromGitter<bung87> var a:ptr int = t
00:16:12FromDiscord<codic> oh thank you!
00:16:48FromDiscord<codic> So `var var1:ptr char = t` would be `char *t`?
00:17:14FromDiscord<codic> Fail
00:17:17FromDiscord<codic> Undeclared identifier
00:17:58FromDiscord<exelotl> `var var1:ptr char = t` would be equivalent to `char *var1 = t`
00:18:45FromDiscord<exelotl> however, what are you planning to use var1 for in this case?
00:19:07FromGitter<bung87> @codic you comming from c?
00:19:41FromDiscord<codic> i am not, just trying to make a friend that loves c to use vim
00:20:09FromDiscord<codic> I'm taking this https://www.tutorialspoint.com/cprogramming/c_pointers.htm
00:21:45FromGitter<bung87> you may need clearify your question , it's about type declaration or assignment?
00:22:05FromDiscord<codic> not sure what ya mean, I don't know c, haha
00:22:18FromDiscord<codic> I'm just trying to find the direct equivalent of `type *something`
00:23:21FromGitter<bung87> then it is `ptr type`
00:23:36*ptdel quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
00:24:31FromDiscord<codic> but where is the `something`
00:24:34FromDiscord<codic> that's what I don't get
00:25:00FromDiscord<codic> for example
00:25:02FromDiscord<codic> let's take this
00:25:02FromDiscord<codic> https://hastebin.com/wamayeporu.cs
00:25:12FromDiscord<codic> I want to do something like that in nim
00:25:23FromDiscord<codic> I get that &var is addr var
00:25:27FromDiscord<codic> but I don't get what char *var is
00:26:00FromDiscord<codic> yes the quotes are wrong lol
00:26:07FromGitter<bung87> `char *var` it's combine the type and variable declaration
00:26:17FromDiscord<exelotl> well first off you don't want to name a var "var" in nim
00:26:24FromGitter<dawkot> https://i.imgur.com/afr6frt.png
00:26:29FromDiscord<Rika> ```var `var`: ptr char```?
00:26:31FromGitter<dawkot> What did they mean by this
00:26:40FromDiscord<exelotl> (unless you do what rika did)
00:26:55FromDiscord<Rika> dawkot: theyre planning to target nim?
00:27:09FromDiscord<codic> Wait, so `var thing: ptr char` == `char *thing`?
00:27:12FromGitter<dawkot> That's what it says
00:27:17FromDiscord<Rika> codic, yes
00:27:31FromDiscord<codic> great
00:27:31FromDiscord<Rika> dawkot: i dont seem to understand what you dont understand
00:28:12FromGitter<dawkot> I'm just surprised
00:28:22FromDiscord<codic> Nooooooo
00:28:43FromDiscord<codic> "template/generic instantiation of `&` from here"
00:28:46FromDiscord<codic> for `echo &"The address of the variable var1 is {var1.addr}"
00:28:47FromDiscord<codic> `
00:29:03FromDiscord<Rika> import strformat
00:29:15FromDiscord<Rika> oh
00:29:16FromDiscord<codic> i did
00:29:19FromDiscord<Rika> oh
00:29:21FromGitter<dawkot> I think you need to cast var1.addr to int
00:29:28FromDiscord<Elegant Beef> isnt `&""` short form of `fmt""`?
00:29:29FromDiscord<codic> ah
00:29:32FromDiscord<Elegant Beef> is *
00:29:34FromDiscord<Rika> @Elegant Beef not exactly
00:29:35FromDiscord<codic> @Elegant Beef It isn't a raw string
00:29:39FromDiscord<KingDarBoja> Not exactly
00:29:42FromDiscord<codic> fmt is a raw string, & isn't
00:29:46FromDiscord<KingDarBoja> fmt does not escape
00:29:48FromDiscord<KingDarBoja> & does
00:29:53FromDiscord<KingDarBoja> Yup
00:30:09FromDiscord<Rika> try `var1.addr` -> `var1.addr.int`
00:30:10FromDiscord<Rika> or something
00:30:17FromDiscord<codic> that casts to int?
00:30:31FromDiscord<Rika> then feel free to also add a `:h` too if you want
00:30:33FromDiscord<codic> Arghhhhhhhhh. "got <ptr ptr char> but expected int"
00:30:33FromGitter<dawkot> if it doesn't work than castint (va1.addr)
00:30:43FromGitter<dawkot> whoops
00:30:49FromDiscord<Rika> `cast[int](var1.addr)`
00:30:51FromGitter<dawkot> `castint (var1.addr)
00:30:52FromGitter<dawkot> whew
00:31:03FromDiscord<Rika> brackets dont seem to like you right now
00:31:04FromDiscord<codic> finallyyy
00:31:22FromDiscord<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:08FromDiscord<codic> true true
00:32:12FromDiscord<codic> just an example
00:33:05FromDiscord<KingDarBoja> How can I shortcircuit and assign?
00:33:32FromDiscord<Rika> @codic ok, just realized something
00:33:32FromDiscord<KingDarBoja> Like `let a = not someInstance.isNil and someIstance.someProp` ?
00:33:38FromDiscord<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:43FromDiscord<Rika> you're getting the pointer of the pointer of the character
00:33:50FromDiscord<codic> oh
00:34:07FromDiscord<Rika> so if you want the first pointer, do `cast[int](var1)`
00:34:22FromDiscord<codic> Ohh
00:34:27FromDiscord<codic> wait what
00:34:33FromDiscord<codic> now it's saying the address of the variable is 0
00:34:37FromDiscord<Rika> var1 is a `ptr char` no?
00:34:40FromDiscord<Rika> really? huh
00:34:41FromDiscord<codic> yes
00:34:56FromDiscord<Rika> :thonk:
00:35:05FromDiscord<codic> lemme put it in playground
00:35:09FromDiscord<exelotl> wow that's a high quality thonk
00:35:17FromDiscord<codic> import strformat
00:35:17FromDiscord<codic> var var1: ptr char
00:35:17FromDiscord<codic> echo &"The address of the variable var1 is {cast[int](var1)}"
00:35:21FromDiscord<codic> https://play.nim-lang.org/#ix=2keL
00:35:23FromDiscord<codic> there ya go
00:35:31FromDiscord<codic> even the playground says 0
00:35:32FromDiscord<Rika> ah
00:35:32FromDiscord<Rika> yeah
00:35:36FromDiscord<Rika> its not initialized
00:35:46FromDiscord<codic> what isnt?
00:35:47FromDiscord<Rika> so it's currently `nil`
00:35:51FromDiscord<Rika> the ptr char
00:35:54FromDiscord<Rika> its nil right now
00:36:03FromDiscord<codic> ah
00:36:16FromDiscord<codic> so `var var1: ptr char = 'o'`
00:36:19FromDiscord<codic> For it to be something?
00:36:37FromDiscord<codic> nvm
00:36:44FromDiscord<codic> That gives got char but expected ptr har
00:36:47FromDiscord<codic> *char
00:37:01FromDiscord<codic> Cant I just get the addr?
00:37:04FromGitter<bung87> you misunderstood declaration and initialization
00:37:44FromDiscord<Rika> @codic https://play.nim-lang.org/#ix=2keM
00:38:06FromDiscord<Rika> now the ptr has no char assigned to it (zeroed out char \0) but it has a pointer now
00:38:33FromDiscord<Rika> this is not idiomatic by the way
00:38:47FromDiscord<Rika> we dont use raw ptrs for just (nonffi) nim code
00:39:41FromDiscord<codic> i know
00:39:53FromDiscord<codic> thanks
00:40:10FromDiscord<KingDarBoja> What about my question Rika?
00:40:11FromDiscord<KingDarBoja> 😄
00:40:17FromDiscord<Rika> i missed it
00:40:19FromDiscord<Rika> one moment
00:40:57FromDiscord<Rika> i dont get what you're trying to do
00:41:12FromDiscord<Rika> you're assigning a bool?
00:41:42FromDiscord<KingDarBoja> No, a type
00:41:58FromDiscord<Rika> huh? can you describe what you're trying to do exactly
00:42:03*donger quit (Remote host closed the connection)
00:42:13FromDiscord<KingDarBoja> I know this is gonna sound annoying but
00:42:19FromDiscord<Rika> dont worry
00:42:25FromDiscord<Rika> ive dealt with a lot of annoying
00:42:43FromDiscord<KingDarBoja> In python, you can check if a type exist and use `and` to perform short-circuit assignment
00:43:06FromDiscord<KingDarBoja> In this case, if the loc prop is not nil, then assign the loc.startToken value to the variable
00:43:30FromDiscord<KingDarBoja> But probably better use if-else uh?
00:43:37FromDiscord<Rika> use an inline if else
00:43:43FromDiscord<Rika> we're not python
00:43:47FromDiscord<Rika> we're not dynamic
00:45:44FromDiscord<KingDarBoja> Just curious, calm down mate :d
00:46:16FromDiscord<Rika> im not mad im just sayin yo
00:46:25FromDiscord<KingDarBoja> yo
00:46:42FromDiscord<codic> how do I make the equal of a `char[length]` from c
00:46:52FromDiscord<codic> Just char[length]? 🤔
00:46:57FromDiscord<Rika> what is char[length]
00:47:04FromDiscord<Rika> please describe, since im not well versed in c
00:48:47*Tlongir joined #nim
00:50:12FromDiscord<codic> creates a char of length *length*
00:50:31FromDiscord<Rika> a char array?
00:50:36FromDiscord<codic> yes
00:50:49FromDiscord<codic> which is basically what a C string (from string.h) is
00:51:00FromDiscord<Rika> that would be var a = newSeq[char](length)
00:51:24FromDiscord<Rika> if you need to interop with C, use a cstring
00:52:02FromDiscord<codic> ah ok
00:53:08FromDiscord<codic> yeah I know
00:53:16FromDiscord<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:39FromDiscord<Rika> ive done that once
00:54:49FromDiscord<codic> haha
00:55:15FromDiscord<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:12FromDiscord<Rika> `for i in 0..<20`
00:56:24FromDiscord<Rika> dont forget colon and indent instead of bracket
00:56:26FromDiscord<codic> that uses ints though
00:56:28FromDiscord<codic> yeah of course haha
00:56:36*Tlongir quit (Ping timeout: 256 seconds)
00:56:40FromDiscord<Rika> size_t is an int is it not
00:57:08FromDiscord<Rika> `size_t is an unsigned integer type of at least 16 bit (see sections 7.17 and 7.18.3).`
00:57:19FromDiscord<codic> oh is it, alright
00:57:31FromDiscord<codic> not a c expert haha
00:57:53FromDiscord<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:04FromDiscord<codic> true
00:58:38FromDiscord<codic> Can I do ` var alphabet: ptr string = "abc";`?
00:58:47FromDiscord<codic> Or will I have to do it another way
00:58:55FromDiscord<Rika> you need to allocate the pointer first
00:58:57FromDiscord<codic> Because I remember doing that with a char gave me a type mismatch
01:00:03FromDiscord<codic> ah, how?
01:00:15FromDiscord<Rika> same way i did before
01:00:56FromDiscord<Rika> var alphabet: ptr string; alphabet = create string; alphabet[] = "abc"
01:01:27FromDiscord<codic> ah
01:01:33FromDiscord<Rika> a string is already internally a pointer though, so this is a double indirection
01:01:59FromDiscord<codic> wdym
01:02:55FromDiscord<Rika> internally a `string` is represented by a `ptr something` where something is the thing i do not know of LOL
01:03:07FromDiscord<Rika> so by doing `ptr string` you are doing `ptr ptr something`
01:03:13FromDiscord<Rika> double pointer; double indirection
01:03:16FromDiscord<codic> oh
01:03:19skrylar[m]strings are seqs of chars or somesth
01:03:27FromDiscord<codic> Is it the same concept in c?
01:03:33FromDiscord<KingDarBoja> https://imgur.com/QC5Wm9s ❤️ Rika-sensei
01:03:36FromDiscord<codic> because I'm just porting the c code with no knowledge
01:03:43skrylar[m]yes seqs are your usual stretchy buffer/vector
01:03:58FromDiscord<codic> ?
01:04:12FromDiscord<codic> no I'm talking about double indirection
01:04:45FromDiscord<Rika> those are more suites that i have tests xd
01:04:50FromDiscord<Rika> i dont like writing tests....
01:05:06FromDiscord<KingDarBoja> Bro, that's 2 suites for one module test
01:05:11FromDiscord<KingDarBoja> And the second one is WIP
01:05:20FromDiscord<KingDarBoja> Writing the missing ones right now 😄
01:05:31FromDiscord<KingDarBoja> But happy to see them passing as I port the tests
01:07:58FromDiscord<Rika> yeah i have 0 tests because i have to write them myself (for my osu lib)
01:08:05FromDiscord<codic> Hm. "Tabs are not allowed" but...but... I don't have tests
01:08:06FromDiscord<Rika> @codic wdym?
01:08:16FromDiscord<Rika> > Hm. "Tabs are not allowed" but...but... I don't have tests
01:08:16FromDiscord<Rika> @codic use space indentation
01:08:38FromDiscord<Rika> wdym about the double indirection btw?
01:08:38FromDiscord<codic> wait why did i say tests
01:08:45FromDiscord<codic> I meant spaces, I do have spaces
01:08:50FromDiscord<codic> I was asking if in C
01:08:52FromDiscord<Rika> are you totally sure
01:09:09FromDiscord<Rika> C can do double indirection but its really not a good sign
01:09:12FromDiscord<codic> a `string` is a `*something`
01:09:19FromDiscord<Rika> yeah thats 1 pointer only
01:09:19FromDiscord<codic> pretty sure
01:09:24FromDiscord<codic> ah
01:09:30FromDiscord<Rika> since youre writing the internal representation itself
01:09:35FromDiscord<Rika> and not pointer of string
01:09:37FromDiscord<codic> https://play.nim-lang.org/#ix=2keV
01:09:50FromDiscord<codic> there's my code that nim is saying uses tabs
01:10:17FromDiscord<codic> strangee
01:10:38FromDiscord<Rika> see where my cursor is
01:10:38FromDiscord<Rika> https://cdn.discordapp.com/attachments/371759389889003532/705586949020188712/unknown.png
01:11:17FromDiscord<codic> yes
01:11:27FromDiscord<codic> can't have trailing whitespace?
01:11:40FromDiscord<Rika> can but thats a tab
01:11:47FromDiscord<Rika> not even a trailing tab is allowed
01:11:56FromDiscord<codic> Yay
01:11:56FromDiscord<codic> fixe
01:11:59FromDiscord<codic> *fixed
01:12:03FromDiscord<codic> to be met by a new error
01:12:13FromDiscord<codic> identifier expected, but got keyword end
01:12:18FromDiscord<codic> Ohhh
01:12:20FromDiscord<Rika> well of course, the proc isnt finished in terms of conversion
01:12:21FromDiscord<codic> Nvm I know the fix
01:12:29FromDiscord<Rika> end is a keyword
01:12:31FromDiscord<Gary M> hey so, I'm trying to learn how to use threads but nimsuggest doesn't like any of it
01:12:47FromDiscord<Gary M> it compiles and runs but the ide experience is fucked
01:12:54FromDiscord<codic> frick
01:12:56FromDiscord<codic> Still same error
01:13:12FromDiscord<codic> i thought it was cuz my var on line 7 was messed up
01:13:23FromDiscord<codic> Ohhhh end is a keyword so I have to do \`end`
01:13:32FromDiscord<Rika> yeah threads are super fucky with nimsuggest from what i recall
01:13:37FromDiscord<Rika> yes
01:13:43FromDiscord<codic> ah ok
01:13:55FromDiscord<codic> welp. failed with this line ` *(str++) = alphabet[counter % alen]`
01:13:57FromDiscord<Rika> this really isnt super idiomatic nim
01:13:58FromDiscord<codic> At least I was closed
01:14:01FromDiscord<codic> for sure it's not
01:14:12FromDiscord<Rika> that is super fucky c code that line
01:14:23FromDiscord<codic> is it `ptr str++`?
01:14:39FromDiscord<Rika> okay
01:14:46FromDiscord<Rika> can i do it instead?
01:14:53FromDiscord<Rika> its a kinda complicated fix
01:15:00FromDiscord<codic> sure
01:15:12FromDiscord<Rika> you shouldnt be doing this at all...
01:15:23FromDiscord<Rika> but i wanna try my hand at doing it
01:15:26FromDiscord<codic> i agree
01:15:28FromDiscord<codic> But fun is fun
01:15:33FromDiscord<Rika> i wont make it idiomatic
01:15:40FromDiscord<codic> haha
01:15:44FromDiscord<Rika> got a new paste?
01:15:53FromDiscord<codic> https://play.nim-lang.org/#ix=2keW
01:16:27FromDiscord<Rika> uh nothing changed
01:16:34FromDiscord<Rika> still have the broken alen
01:17:29FromDiscord<KingDarBoja> Should I worry about this hint after running the test suite?
01:17:33FromDiscord<KingDarBoja> "Hint: 116259 LOC; 3.285 sec; 155.301MiB peakmem; Debug build;"
01:17:49FromDiscord<Rika> i dont see whats worrying
01:18:01FromDiscord<codic> oof
01:18:05FromDiscord<KingDarBoja> That's why I am asking, I don't understand at all the first thing
01:18:15FromDiscord<codic> aaaaah die, stupid `*(str++)`
01:18:18FromDiscord<KingDarBoja> the sec is the compile time right?
01:18:32FromDiscord<codic> maybe `ptr str + 1`
01:18:32FromDiscord<KingDarBoja> The second parameter ofc
01:20:10FromDiscord<Rika> codic, dont worry about that, its much more complicated than you think
01:20:23FromDiscord<codic> hm
01:20:34FromDiscord<codic> welp
01:20:39FromDiscord<Rika> can i see the original code?
01:20:54FromDiscord<codic> Sure
01:21:08FromDiscord<codic> gimme a sec
01:21:10FromDiscord<codic> https://hatebin.com/dbvnqqvlkh
01:21:18FromDiscord<codic> Gotta head out, brb in 15 min
01:28:00FromDiscord<Gary M> if threads is a system module why can't nimsuggest see it
01:29:30zacharycarterMy first suggestion is not using nimsuggest
01:29:56zacharycarterbut I don't know - maybe because you didn't import the module
01:30:17zacharycarterand it's only included when a compile flag is set
01:30:29FromDiscord<Gary M> threads > Note: This is part of the system module. Do not import it directly.
01:31:00FromDiscord<Gary M> I can't not use nimsuggest... it's the only thing that's making vs code support work lol
01:31:16FromDiscord<KingDarBoja> F
01:31:54FromDiscord<Gary M> so I'm trying to work with threads, which do compile and run with the threads flag as intended
01:31:54zacharycarterit used to annoy the hell out of me when I used VS Code
01:32:02FromDiscord<Gary M> https://i.imgur.com/8oooeyn.png
01:32:37FromDiscord<Gary M> but everything is broken really bad trying to work with it
01:33:01zacharycarterI'm not sure :/ I don't use VS Code anymore
01:33:10zacharycarterI do use threads though
01:33:44FromDiscord<Gary M> this is a little depressing lol
01:33:48FromDiscord<treeform> I think creating a config.nims and adding a line `--d:threads` will help the VS Code
01:33:59FromDiscord<treeform> @Gary M ^
01:35:09FromDiscord<treeform> sorry its `--threads:on` not the other other thing
01:35:51FromDiscord<treeform>
01:35:51FromDiscord<treeform> https://cdn.discordapp.com/attachments/371759389889003532/705593296512221245/unknown.png
01:35:57FromDiscord<treeform> No Thread errors.
01:36:26FromDiscord<Gary M> ahh that seems to do it yeah
01:36:33FromDiscord<Gary M> now I just have the errors in the nims file 😄
01:36:35FromDiscord<Rika> https://play.nim-lang.org/#ix=2kf4 @codic
01:36:41FromDiscord<Gary M> https://i.imgur.com/iSh0lKF.png
01:36:46FromDiscord<Rika> its horrible btw, this proc you made me write
01:36:56FromDiscord<treeform> I don't have that. Strange.
01:37:02FromDiscord<codic> > its horrible btw, this proc you made me write
01:37:05FromDiscord<treeform> well just close the nims file
01:37:06zacharycarterRika: do you want to fill us in on why axion would rather die than use Nim again?
01:37:08FromDiscord<codic> But... but.... I didn't make you do anything
01:37:18zacharycarterhe made you his proxy
01:37:23FromDiscord<Rika> zacharycarter: axion really dislikes how araq handles nim
01:37:32FromDiscord<codic> haha
01:37:33FromDiscord<Rika> @codic i mean, this proc
01:37:36FromDiscord<Rika> not that you made me write it
01:37:40FromDiscord<Rika> but its just horrible
01:37:54FromDiscord<codic> lol
01:38:06FromDiscord<codic> you expanded my dowhile 😢
01:38:08FromDiscord<Rika> axion just really doesnt like his stubbornness
01:38:22FromDiscord<Rika> codic: i did it just to make sure it wasnt doing the error
01:38:23FromDiscord<treeform> @Rika your proc looks like C not nim.
01:38:27FromDiscord<Rika> you can collapse it back
01:38:31FromDiscord<codic> haha
01:38:31FromDiscord<Rika> @treeform it is intentional
01:38:38FromDiscord<Rika> codic wants it to look like C
01:38:43FromDiscord<Rika> i think
01:38:49FromDiscord<treeform> then they should use C?
01:38:50FromDiscord<Rika> he doesnt want idiomatic nim
01:38:53FromDiscord<Rika> I DONT KNOW
01:38:55FromDiscord<Rika> ask codic
01:39:07zacharycarterRika: gotcha, thanks for the explanation
01:39:29FromDiscord<codic> i don't, this is just to see how far nim can go
01:39:39zacharycartertreeform: maybe he's not trying to use the GC?
01:39:42FromDiscord<Gary M> wait nvm the errors went away magically
01:39:46FromDiscord<Gary M> everything is good now
01:39:46FromDiscord<Rika> he (ax) also fears that nim will die because of this stubbornness, he thinks ar is making nim his experimental playfield
01:39:55FromDiscord<Gary M> @treeform thank you 😄
01:40:04zacharycarterRika: mfiano should hang out with krux-2
01:40:17FromDiscord<Rika> yeah he also said that he likes krux
01:40:42zacharycarterhaha I like krux too but Nim wouldn't exist without Araq and Araq is smarter than mfiano
01:40:50zacharycarterand krux as well
01:40:59FromDiscord<Rika> i cant say for sure that ar is smarter than ax
01:41:06FromDiscord<Rika> because i dont know them too well
01:41:16FromDiscord<Rika> im just a dumb highschooler damn it
01:41:18zacharycarterI can - the latter often wants to be the smartest in the room and isn't
01:41:22FromDiscord<codic> anyways rika your proc works perfectly
01:41:32zacharycarterI've interacted with him in multiple IRC channels
01:41:42FromDiscord<Rika> i hope i can trust your word
01:41:46FromDiscord<codic> just one difference - instead of one line with everything comma seperated each thing is on a different line
01:41:57FromDiscord<Rika> and i really hope nim doesnt die out
01:41:58FromDiscord<codic> i think i can fix that
01:42:04FromDiscord<codic> yeah it'd be sad to see it go
01:42:04FromDiscord<Rika> codic: is that not how its supposed to work???
01:42:18FromDiscord<codic> No, turns out the code the person gave me is wrong because hes an idiot
01:42:22FromDiscord<codic> hahaha
01:42:23FromDiscord<Rika> nice.
01:42:32FromDiscord<Rika> give me the updated code, ill write idiomatic nim this time
01:42:44FromDiscord<codic> how do I write to stdout without an extra newline?
01:42:50FromDiscord<codic> sure after i get this
01:42:54FromDiscord<Rika> stdout.write theString
01:42:58FromDiscord<codic> o
01:43:17zacharycarterRika: mfiano uses common lisp lol, which is arguably more niche than Nim at this point
01:43:46FromDiscord<Rika> im not a fan of bashing languages
01:44:00FromDiscord<Rika> even if i do it, some half of me dislikes me doing that
01:44:15zacharycarterit's not an attempt to bash a language - I dont really have a dislike of common lisp
01:44:21FromDiscord<Rika> i suspect i have some sort of fragmented personality issue or something
01:44:38FromDiscord<Rika> but its just a suspicion
01:44:39FromDiscord<Rika> anyway
01:44:41zacharycarterI'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:44FromDiscord<Rika> what's wrong with common lisp?
01:45:32zacharycarterI 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:58zacharycarterI was just commenting on your statment regarding worrying about Nim disappearing
01:46:24zacharycarterNim 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:37FromDiscord<Zed> How many keywords does nim have?
01:46:42FromGitter<dawkot> Isn't Nim kind of at it's peak popularity, excluding right after 1.0 release?
01:47:06zacharycarterit is I imagine
01:47:14FromGitter<dawkot> If true, it was much more in danger of dying out then than now
01:47:24FromDiscord<codic> lemme get the error
01:47:24FromDiscord<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:30zacharycarteryeah Nim's been in development for over a decade
01:47:54FromDiscord<codic> Also tried `write stdout, str`
01:48:08FromDiscord<Zed> write(stdout,"string here")
01:48:08FromDiscord<codic> sad
01:48:11FromDiscord<codic> oh
01:48:13FromDiscord<codic> let's see
01:48:31FromDiscord<codic> same error
01:48:38FromDiscord<codic> this is a seq not a string btw
01:48:39FromDiscord<codic> Oohhhhhhh
01:48:45FromDiscord<codic> That's why it prints on multiple lines
01:48:51FromDiscord<Zed> convert it to a string?
01:49:00FromDiscord<codic> Is there something like Seq.join?
01:49:00FromDiscord<Rika> its a seq?
01:49:03FromDiscord<Zed> using .repr
01:49:12FromDiscord<Rika> im so confused to what you're trying to do
01:49:26FromDiscord<Zed> write(stdout, sequence.repr)
01:49:35FromDiscord<codic> trying
01:49:42FromDiscord<codic> Uhhhh
01:49:45FromDiscord<KingDarBoja> Okay I am getting tired of casting cuz OOP
01:49:51FromDiscord<Rika> sometimes i just wish i could see what the hell your code looks like right now
01:49:55FromDiscord<codic> I get a buncha `ptr thing -> 't'`
01:49:55FromDiscord<codic> Lo
01:49:58FromDiscord<codic> *lol
01:49:59FromDiscord<codic> wait
01:50:05FromDiscord<Zed> iterate over the sequence
01:50:05FromDiscord<codic> https://play.nim-lang.org/#ix=2kf6
01:50:09FromDiscord<Zed> and print each value
01:50:29FromDiscord<codic> `for t in str: echo t`
01:50:31FromDiscord<codic> let's try that
01:50:37FromDiscord<codic> Nope
01:50:41FromDiscord<codic> That is *not* what I want
01:51:24FromDiscord<codic> Never mind
01:51:27FromDiscord<Rika> i dont get what you're doing
01:51:29FromDiscord<codic> I am just plain utter stupid
01:51:38FromDiscord<Rika> the reason there are newlines is because of the for loop
01:51:42FromDiscord<codic> yeah, ignore me
01:51:45*chemist69 quit (Ping timeout: 240 seconds)
01:51:48FromDiscord<codic> I'm just stupid as stupidness
01:51:50FromDiscord<codic> lol
01:52:05FromDiscord<codic> The person who wrote the original c code piped it thru `tr`
01:52:13FromDiscord<codic> and replaced all newlines with commas
01:53:18FromDiscord<Rika> smh
01:53:20FromDiscord<Rika> smh smh
01:53:25FromDiscord<Rika> double stupid, your friend is
01:53:44*chemist69 joined #nim
01:54:40FromDiscord<codic> ayy
01:55:12FromDiscord<codic> final code if you want to idiomacize it
01:55:13FromDiscord<codic> https://hatebin.com/ffoyvjeaut
01:56:40FromDiscord<Rika> hey! you stole my code! 1/2jk
01:58:49FromDiscord<codic> lol
01:59:04FromDiscord<codic> oh yeah
01:59:06FromDiscord<codic> it is the same code
01:59:09FromDiscord<codic> posting that was useless
01:59:26FromDiscord<codic> wasted 2-3b on hatebin's server wherever it is
01:59:27FromDiscord<codic> smh
02:00:54FromDiscord<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:07FromDiscord<treeform> hello
02:01:32FromDiscord<KingDarBoja> WAT
02:01:32FromDiscord<codic> Hey!
02:01:36FromDiscord<codic> lol
02:01:39FromDiscord<bedwardly-down> Hello
02:01:45FromDiscord<Gary M> I didn't say you "needed to"
02:01:50FromDiscord<Rika> hello down
02:01:53FromDiscord<bedwardly-down> 🤪
02:01:55FromDiscord<KingDarBoja> Hello up
02:02:06FromDiscord<KingDarBoja> 🍭
02:02:26FromDiscord<bedwardly-down> He really didn’t. I just figured I’d jump in with a splash. 😂
02:03:32FromDiscord<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:35FromDiscord<codic> if nim has an inbuilt function to get permutations... *sigh*
02:03:39FromDiscord<codic> alright thanks
02:03:44FromDiscord<Gary M> Welcome to the nimmuity bedwardude
02:04:08FromDiscord<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:13FromDiscord<codic> Why `var alphabet:string = "abc"`? type inference
02:04:25FromDiscord<Rika> https://nim-lang.org/docs/algorithm.html#nextPermutation%2CopenArray%5BT%5D ?????? @codic
02:04:26FromDiscord<codic> same with str:string
02:04:30FromDiscord<codic> nooooooooooooooooooooo
02:04:34FromDiscord<codic> my whole purpose has died
02:04:36FromDiscord<Rika> bruh
02:04:38FromDiscord<bedwardly-down> Actually, Haxe has its levels of cringe woth awesomeness
02:04:45FromDiscord<bedwardly-down> With*
02:04:56FromDiscord<codic> wait, I meant for a string
02:05:00FromDiscord<codic> not seq
02:05:08FromDiscord<Rika> haxe legit looks interesting but i dont like langs w/ braces
02:05:15FromDiscord<treeform> what are you guys doing every combinations of a,b and c?
02:05:17FromDiscord<Rika> its just too ingrained in me to not use braces
02:05:27FromDiscord<codic> tbh the one thing I hate about nim is no braces
02:05:33FromDiscord<Gary M> Lol
02:05:37FromDiscord<codic> @treeform i was tryna port a permutation function from
02:05:40FromDiscord<codic> *from C
02:05:51FromDiscord<Gary M> Nobody ever seems to be 100% satisfied with any language they use
02:06:00FromDiscord<treeform> I am pretty satisfied with Nim.
02:06:03FromDiscord<treeform> I am pretty satisfied with Nim.
02:06:14FromDiscord<Rika> rest in peace irc users
02:06:16FromDiscord<Elegant Beef> Yea but you actually know how to use it 😄
02:06:38FromDiscord<Rika> @codic always search the standard library first before you port something 😛
02:06:42FromDiscord<Gary M> Mr. Elegant "Doesn't like spaces over tabs" Beef
02:06:48FromDiscord<codic> :P
02:07:00FromDiscord<bedwardly-down> Honestly c and c++ make me cringe
02:07:01FromDiscord<codic> eh
02:07:03FromDiscord<codic> was more fun anyways
02:07:06FromDiscord<Rika> why?
02:07:12FromDiscord<Rika> whats so cringe w/ c
02:07:40FromDiscord<bedwardly-down> But that’s because I haven’t spent enough time with either doing things that interest me. 🤪
02:07:40FromDiscord<Elegant Beef> I mean tabs allow customizabillity
02:07:53FromDiscord<Elegant Beef> So this is why i will never say spaces are better
02:08:00FromDiscord<Gary M> It looks and feels old and c "strings" are annoying
02:08:02FromDiscord<codic> go ftw
02:08:09FromDiscord<Rika> > go
02:08:11FromDiscord<codic> What's the use of the go gc for nim anyways?
02:08:26FromDiscord<Rika> if you want to ffi with go w/ nim
02:08:30FromDiscord<Rika> in*
02:08:33FromDiscord<Rika> not w/
02:08:43FromDiscord<Gary M> Interop with go
02:08:51FromDiscord<Gary M> I wouldn't use it otherwise
02:09:06FromDiscord<Rika> man im too mentally exhausted to argue about spaces and tabs and languages and braces and shit
02:09:07FromDiscord<codic> wait you can interop with go?
02:09:09FromDiscord<codic> :gasp:
02:09:21FromDiscord<Rika> that shits tiring and leads to no good conclusion
02:09:23FromDiscord<KingDarBoja> I haveno issues with braces
02:09:24FromDiscord<codic> my opinion of nim is just rising and rising
02:09:25FromDiscord<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:29FromDiscord<KingDarBoja> I use Typescript / Python so
02:09:42FromDiscord<Rika> i can use a language w/ braces, i just dont like them
02:09:50FromDiscord<codic> i like braces because copy paste issues with indentation not being consistent
02:09:50FromDiscord<treeform> it looks like your function does not permute correctly? Its missing permutations? What should the real output be?
02:09:55FromDiscord<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:56FromDiscord<Rika> i dont care what you use, i use spaces, go convert that to what you use if you want
02:09:58FromDiscord<KingDarBoja> 🔝
02:10:02FromDiscord<Rika> dont fucking make me convert to what you use
02:10:03FromDiscord<KingDarBoja> What codic said
02:10:30FromDiscord<KingDarBoja> I am not going to convert you ❤️
02:10:37*FromDiscord <KingDarBoja> cast[Rika]
02:10:42FromDiscord<Rika> > it looks like your function does not permute correctly? Its missing permutations? What should the real output be?
02:10:42FromDiscord<Rika> @treeform its intentional because theres the counter variable that limits output
02:10:50FromDiscord<Rika> SIGSEGV
02:10:56FromDiscord<codic> yeah, I can remove the counter
02:11:04FromDiscord<Gary M> cast[object](Rika)
02:11:15FromDiscord<Rika> Segmentation Fault: core dumped
02:11:30FromDiscord<codic> cast[cstring]("Rika")
02:11:44FromDiscord<codic> if i understand what casting is that'll convert you to a cstring
02:11:53FromDiscord<Gary M> Well
02:11:54FromDiscord<Rika> dont do that though
02:12:01FromDiscord<Gary M> You don't need to do that kind of cast for that
02:12:02FromDiscord<Elegant Beef> That's a last resort
02:12:10FromDiscord<KingDarBoja> Speaking of casting
02:12:14FromDiscord<Rika> you really should read the manual
02:12:26FromDiscord<Gary M> cast[] is essentially like a reinterpret cast you'd find in C++
02:12:32FromDiscord<codic> i should
02:12:32FromDiscord<codic> I know I don't
02:12:48FromDiscord<Gary M> It'll treat the memory as though it was another type without doing any type conversion
02:12:56FromDiscord<Elegant Beef> This bit stream is now that type, congrats, you fucked it!
02:13:00FromDiscord<codic> how does nim cross compile?
02:13:01FromDiscord<bedwardly-down> Does cast work pretty similar to how it does in Java, though?
02:13:06FromDiscord<Gary M> Idk
02:13:13FromDiscord<KingDarBoja> https://github.com/KingDarBoja/Phosphate/blob/master/tests/language/test_parser.nim
02:13:14FromDiscord<Elegant Beef> normal type casting is done TypeB(obj)
02:13:21FromDiscord<KingDarBoja> Scroll down and face the cast hell
02:13:27FromDiscord<KingDarBoja> Darn OOP
02:13:36FromDiscord<KingDarBoja> Going to switch to object variants
02:13:37FromDiscord<codic> i saw an article somewhere but forgot it
02:13:41FromDiscord<codic> oof
02:13:52FromDiscord<bedwardly-down> If it does, then it’s comparable to haxe’s cast system
02:13:55FromDiscord<Gary M> cstring("Rika")
02:14:01FromDiscord<Rika> how does java do cast?
02:14:01FromDiscord<Elegant Beef> The cast[TypeB](ob) just says it's typeB and doesnt care about the data there
02:14:08FromDiscord<codic> found the basics `nim c --cpu:arch --os:os thing.nim`
02:14:16FromDiscord<codic> all based on https://www.reddit.com/r/nim/comments/avtq1u/nim_cross_compile_osx_to_linux_how_to/, lol
02:14:22FromDiscord<Rika> cast[]() is like the "i made this" meme
02:14:25FromDiscord<KingDarBoja> @Elegant Beef in my case, it is to force the type to be what's expected
02:14:35FromDiscord<KingDarBoja> As my objects have the correct type
02:14:47FromDiscord<Rika> this meme
02:14:48FromDiscord<Rika> https://cdn.discordapp.com/attachments/371759389889003532/705603093722824724/iu.png
02:14:50FromDiscord<KingDarBoja> But the "wrapper" proc will return it's parent type
02:14:56FromDiscord<Rika> "meme"
02:15:01FromDiscord<Rika> just a comic more of
02:15:06FromDiscord<bedwardly-down> Cast in Java - cast(var, new type) for the most part
02:15:06*FromDiscord <KingDarBoja> Trying inheritance stuff
02:15:20FromDiscord<Rika> @bedwardly-down what does it do exactly?
02:15:33FromDiscord<Elegant Beef> @bedwardly-down https://play.nim-lang.org/#ix=2kfg
02:15:37FromDiscord<Elegant Beef> Run that
02:16:09FromDiscord<bedwardly-down> Allows you to transition types between variables that come from the same base inheritance
02:16:13*monok joined #nim
02:16:43FromDiscord<Elegant Beef> That's not what cast[]() does
02:16:46FromDiscord<bedwardly-down> That’s not the same cast.
02:16:53FromDiscord<bedwardly-down> Point proven
02:17:07FromDiscord<KingDarBoja> Errr...
02:17:14FromDiscord<bedwardly-down> And it ran on mobile too with no issues
02:17:14FromDiscord<Elegant Beef> cast[]() just says this is type is a new type without any assurance
02:17:17FromDiscord<KingDarBoja> Guys
02:17:22FromDiscord<KingDarBoja> Thta's what I did lol
02:17:23FromDiscord<Rika> yes
02:17:29FromDiscord<KingDarBoja> -> Allows you to transition types between variables that come from the same base inheritance
02:17:36FromDiscord<codic> you can make mobile apps with nim??
02:17:37FromDiscord<KingDarBoja> That's why I am using it
02:17:44FromDiscord<Rika> you do type(var) instead of cast[] for that
02:17:52FromDiscord<KingDarBoja> 🤔
02:17:56FromDiscord<bedwardly-down> Cast in Java and Haxe is like getting a gender change in real life except not as permanent
02:17:58FromDiscord<Rika> nim can compile to objective c
02:18:06FromDiscord<KingDarBoja> Hold on, I will try
02:18:16FromDiscord<Gary M> Ok well we're talking about casting in nim
02:18:23FromDiscord<codic> that is only ios not android though
02:18:28*mono quit (Ping timeout: 246 seconds)
02:18:31FromDiscord<codic> And even in the ios scope do you have access to the UIKit apis?
02:18:32FromDiscord<Rika> @bedwardly-down see image i sent above to know what nim cast does
02:18:43FromDiscord<Rika> nim can compile to android target too yes
02:18:43FromDiscord<Elegant Beef> Also my nimplayground example
02:18:50FromDiscord<codic>
02:18:50FromDiscord<codic> https://cdn.discordapp.com/attachments/371759389889003532/705604110409400381/iu.png
02:18:54FromDiscord<codic> for convienence
02:19:09FromDiscord<codic> Ah, but do we have access to ui kit or whatever android uses
02:19:16FromDiscord<bedwardly-down> I saw. I get the impression of an identity complex there
02:19:24FromDiscord<codic> PreviousMessage.replace("or", "and")
02:19:24FromDiscord<KingDarBoja> Rika, u right
02:19:41FromDiscord<Gary M> 9 times out of 10 you just want a normal type cast int(someFloat)
02:19:55FromDiscord<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:13FromDiscord<KingDarBoja> That's why I need object variants afaik
02:20:16FromDiscord<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:20FromDiscord<Elegant Beef> Typically you'll only use the cast[]() from my experience with library bindings that return weird values
02:20:48FromDiscord<Elegant Beef> For instance the glfw bindings returning just `pointer` from a GetX11Window
02:21:31FromDiscord<KingDarBoja> Rip Rika
02:21:43FromDiscord<Rika> im still alive
02:21:45FromDiscord<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:45FromDiscord<Rika> barely
02:22:17zacharycarterhttps://github.com/zacharycarter/frag/blob/master/src/frag.nim#L8-L31 - is there a better way to do this?
02:22:46zacharycarterhttps://github.com/zacharycarter/frag/blob/master/examples/00-minimal/minimal.nim#L3-L4
02:22:49zacharycarteris the associated code
02:23:03FromDiscord<bedwardly-down> Although, using a straight getX11Window is cringe as a Linux user, @Elegant Beef
02:23:10zacharycarterall 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:20FromDiscord<Elegant Beef> I mean i created a GLFW window and i wanted it as a X11 window
02:24:06FromDiscord<Elegant Beef> Since it was my status bar for my shitty wm 😄
02:24:57FromDiscord<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:24FromDiscord<Elegant Beef> Yea was making a Xserver only wm
02:25:36FromDiscord<bedwardly-down> Got it
02:25:37FromDiscord<Elegant Beef> Which i guess is a dumpster fire that will be abandonwae
02:25:44FromDiscord<Elegant Beef> abandonware*
02:25:50FromDiscord<Gary M> Vaporware
02:26:09FromDiscord<Elegant Beef> Well no cause it works gary
02:26:27FromDiscord<Gary M> 👀
02:26:30FromDiscord<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:35FromDiscord<KingDarBoja> Synthwave
02:26:47FromDiscord<Gary M> Sorry I meant trashware
02:27:29*muffindrake quit (Ping timeout: 246 seconds)
02:27:30FromDiscord<Elegant Beef> Bedwardly i mean my WM is a dumpster fire
02:27:31FromDiscord<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:04FromDiscord<treeform> @codic @Rika This is how I would do that strange code in nim style: https://play.nim-lang.org/#ix=2kfj
02:28:07FromDiscord<Gary M> Where's that fullscreen support in your wm haha
02:28:17FromDiscord<Elegant Beef> Feck off
02:28:17FromDiscord<Rika> bruh
02:28:29FromDiscord<Gary M> Is it perhaps literally crashing the wm
02:28:31FromDiscord<Rika> i said i have no more think juice
02:28:32FromDiscord<Elegant Beef> I got _NET_SUPPORTED atoms working
02:28:33FromDiscord<bedwardly-down> Does your wm at least play doom?
02:29:02FromDiscord<Elegant Beef> But it doesnt seem to send the _NET_WM_STATE_FULLSCREEN event that awesomewm gets
02:29:09FromDiscord<Rika> im out for now, i just wanna do nothing rn
02:29:16FromDiscord<Elegant Beef> Ok buh bye?
02:29:20FromDiscord<bedwardly-down> Night, rika
02:29:37FromDiscord<Rika> you're assuming its night
02:29:41FromDiscord<Elegant Beef> badwardly come work on goodwm with me and help me fix it up to be fully compliant!
02:29:41FromDiscord<Rika> when its actually 10 am
02:29:48*muffindrake joined #nim
02:29:53FromDiscord<Elegant Beef> hey it's night somewhere in the world
02:30:26FromDiscord<Gary M> Just come back to the land of winblows
02:30:32FromDiscord<Elegant Beef> Lol
02:30:38FromDiscord<Elegant Beef> Or i could just use any number of WMs
02:30:45FromDiscord<Gary M> Gross
02:31:00FromDiscord<Elegant Beef> Sorry i dont need small weeble wobbles when i move windows with my keyboard
02:31:03FromDiscord<Gary M> Windows explorer is the best wm
02:31:10FromDiscord<bedwardly-down> Where would i start, Beef?
02:31:19FromDiscord<Gary M> Learning Nim, probably
02:31:29FromDiscord<Elegant Beef> *If you're serious, after learning nim go look at xlib and learn how Xlib works
02:32:00FromDiscord<Elegant Beef> I'll properly setup my nimble stuff anyway been pushing that off for too long 😄
02:33:06FromDiscord<Rika> bruh dont actually do what he says
02:33:08FromDiscord<bedwardly-down> Xlib shouldnt be super difficult since i least know the basics of how the xserver stack works
02:33:12FromDiscord<Rika> why am i still here
02:33:23FromDiscord<Rika> i really need to do something else
02:33:49FromDiscord<bedwardly-down> Because you want me, Rika. I’m new and everybody wants me always. 😈
02:34:11FromDiscord<Elegant Beef> Cant tell why rika is saying dont do what i say
02:34:16FromDiscord<KingDarBoja> Because we love you 🙂
02:34:27FromDiscord<KingDarBoja> But yeah, you should take a rest 😄
02:34:44FromDiscord<bedwardly-down> I miss beef, tbh. It’s just straight up too expensive right now to buy
02:35:18FromDiscord<bedwardly-down> A 16 ounce tube of ground chuck is like $6 right now. It’s nuts
02:35:44FromDiscord<Gary M> Beef why did you raise your prices
02:35:54FromDiscord<Elegant Beef> Im elegant, im worth it trust me
02:35:56FromDiscord<Rika> how did beef suddenly convert into nuts
02:36:16FromDiscord<Elegant Beef> We obviously have spoken much, i am crazy
02:36:35FromDiscord<Gary M> cast[nuts](groundChuck)
02:36:55FromDiscord<KingDarBoja> cast[cast[cast[...]]]
02:37:00*FromDiscord <KingDarBoja> Recursive casting
02:37:41FromDiscord<bedwardly-down> Hamburgers with peanut butter and swiss on a wheat bun - 🤤
02:37:43FromDiscord<Gary M> Wouldn't it be more like cast[](cast[](cast[])))
02:37:53FromDiscord<Gary M> Wouldn't it be more like cast[](cast[](cast[]()))
02:38:05FromDiscord<Rika> why is the nim discord so magnetic for me
02:38:18FromDiscord<Gary M> Sorry for edit irc rip u guys
02:38:40FromDiscord<Elegant Beef> Rika you just know a good chat group when you see them
02:39:05FromDiscord<Rika> why do you think im in 100 discord servers
02:39:21FromDiscord<Elegant Beef> But you're currently active here, that says a lot what you think about us
02:39:21PrestigeHey 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:44FromDiscord<Elegant Beef> Yes but i just call refocus after
02:39:50FromDiscord<Elegant Beef> Yes but i'll just call refocus after
02:40:05FromDiscord<KingDarBoja> 100 discord
02:40:08FromDiscord<KingDarBoja> Dudeee wtf
02:40:10FromDiscord<Elegant Beef> I have a "get focus" proc which will get the currently selected window and make it the active one
02:40:19FromDiscord<codic> @treeform Thanks!
02:40:25FromDiscord<codic> I'll look at that and see the diferences
02:40:31PrestigeI was planning on tracking the previous window and selecting that one, manually
02:40:36FromDiscord<Elegant Beef> ie `screens[selected].workspaces[selectedWorkspace].rawWindow` will be active
02:40:41FromDiscord<Rika> > 100 discord
02:40:41FromDiscord<Rika> i'm also mod in a considerable amount of those servers xd
02:40:55FromDiscord<Gary M> Easy way to destroy Windows is still install a virus
02:41:02FromDiscord<KingDarBoja> I have Windows
02:41:03FromDiscord<KingDarBoja> 😄
02:41:03FromDiscord<Gary M> Is to*
02:41:19*FromDiscord <KingDarBoja> JOIN US
02:41:20FromDiscord<Gary M> You can also destroy Windows by damaging the hard drive
02:41:58FromDiscord<KingDarBoja> Why my status isn't set to VSCode 😢
02:42:26FromDiscord<KingDarBoja> nvm found it
02:43:26FromDiscord<codic> There's an easier way
02:43:35FromDiscord<codic> hold on
02:43:57FromDiscord<codic> Easy!
02:44:10FromDiscord<codic> Open cmd.exe or powershell and `DISKPART`
02:44:10PrestigeBeef: 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:28FromDiscord<bedwardly-down> Prestige, if it’s calling after the window closes, that means it’s not actually destroying the window properly.
02:44:31FromDiscord<Elegant Beef> if the index isnt at a window i move it down
02:44:36FromDiscord<codic> type `list disk` when the prompt comes up. find your disk, then type `SELECT DISK 0` to select it.
02:44:44FromDiscord<codic> then type `clean` and restart.
02:44:50PrestigeAh ok, I was going to do something similar. Thanks
02:44:56FromDiscord<codic> you should not be able to boot unless you have a dualboot or live usb
02:45:01FromDiscord<codic> :)
02:45:47Prestigebedwardly: 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:50FromDiscord<bedwardly-down> @Elegant Beef , are you caching the Windows to make it quicker for them to pop back up or what?
02:46:08FromDiscord<bedwardly-down> That’s what I’m saying. It shouldn’t be doing that
02:46:18FromDiscord<Elegant Beef> I mean i store the windows in workspaces
02:46:19PrestigeYeah, so I must need something else to destroy it
02:46:31FromDiscord<Elegant Beef> Those workspaces are then stored inside a screen
02:46:49FromDiscord<Elegant Beef> So i guess yes?
02:47:03FromDiscord<Elegant Beef> My workspaces arent setup x complaint since i didnt read anything about it
02:47:08FromDiscord<Elegant Beef> I just started making/moving windows
02:47:15FromDiscord<Elegant Beef> then learned about atoms and went, well damn
02:47:43FromDiscord<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:23PrestigeBeef: 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:49FromDiscord<bedwardly-down> That way the windows get destroyed but can be recreated with the same parameters
02:48:51FromDiscord<Elegant Beef> I do not like saving layouts
02:48:58FromDiscord<Elegant Beef> I like mathematical layouts
02:49:12FromDiscord<Elegant Beef> If i open a window i expect it to be added to the bottom of the stack
02:49:22FromDiscord<Elegant Beef> Unless it's a specific window meant to go to a specific workspace
02:49:29FromDiscord<bedwardly-down> Systems with shitty drivers could have some issues if they’re still running in the background
02:49:44FromDiscord<Elegant Beef> Prestige that was just off of something i read
02:49:50FromDiscord<Elegant Beef> Again i have 0 clue how to properly use xlib
02:50:03FromDiscord<Elegant Beef> i just stumble around since i am very bad about reading
02:50:11FromDiscord<Elegant Beef> I much prefer face ramming over reading docs
02:50:27PrestigeI'll see if XDestroyWindow works better and let you know
02:50:58FromDiscord<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:28FromDiscord<Elegant Beef> On destroy notify you should remove the window and refocus if it was the focued window
02:51:30FromDiscord<Elegant Beef> That's what i do
02:51:35FromDiscord<Elegant Beef> Look at my OnDestroyWindow
02:51:40FromDiscord<Elegant Beef> I believe that handles it
02:52:20PrestigeCool, I'll take a look
02:52:36FromDiscord<codic> I have officially died. Nim is faster than c????
02:52:52PrestigeWhat?
02:52:57FromDiscord<codic> program in nim:
02:52:58FromDiscord<codic> Executed in 2.40 millis fish external
02:52:58FromDiscord<codic> usr time 2.38 millis 408.00 micros 1969.00 micros
02:52:58FromDiscord<codic> sys time 0.15 millis 154.00 micros 0.00 micros
02:53:04FromDiscord<codic> and in c:
02:53:04FromDiscord<codic> Executed in 2.40 millis fish external
02:53:05FromDiscord<codic> usr time 2.38 millis 408.00 micros 1969.00 micros
02:53:05FromDiscord<codic> sys time 0.15 millis 154.00 micros 0.00 micros
02:53:10FromDiscord<codic> wait what
02:53:13FromDiscord<Elegant Beef> Depends on use case
02:53:13FromDiscord<Elegant Beef> https://github.com/kostya/benchmarks
02:53:17FromDiscord<codic> I mean
02:53:19FromDiscord<codic> In nim: ________________________________________________________
02:53:19FromDiscord<codic> Executed in 2.40 millis fish external
02:53:19FromDiscord<codic> usr time 2.38 millis 408.00 micros 1969.00 micros
02:53:19FromDiscord<codic> sys time 0.15 millis 154.00 micros 0.00 micros
02:53:25FromDiscord<codic> and in c
02:53:25FromDiscord<codic> ________________________________________________________
02:53:26FromDiscord<codic> Executed in 3.77 millis fish external
02:53:26FromDiscord<codic> usr time 3.75 millis 421.00 micros 3.32 millis
02:53:26FromDiscord<codic> sys time 0.16 millis 160.00 micros 0.00 millis
02:53:36FromDiscord<Elegant Beef> In this benchmark nim is slower and more memory hungry than python
02:53:39FromDiscord<Elegant Beef> for json*
02:53:46PrestigeI mean it compiles to C so it depends on how efficiently written it is, right?
02:54:15shashlickPython is written in C and has had years to optimize
02:54:30FromDiscord<bedwardly-down> @codic , are you using fish shell too?
02:54:34FromDiscord<Elegant Beef> It's only json where it really loses shashlick
02:55:06*zacharycarter quit (Ping timeout: 256 seconds)
02:55:12FromDiscord<codic> @bedwardly-down yeah
02:55:13PrestigeBeef: I finished my first milestone for my wm last night. Have tags and a master/stack layout with gaps
02:55:19FromDiscord<Elegant Beef> nice
02:55:28FromDiscord<bedwardly-down> Fack yeah!!!
02:55:32FromDiscord<Elegant Beef> Mine is mostly functional minus a few things
02:55:33Prestigefeelsgood
02:56:06PrestigeNeed to clean up focus behavior, and find out why launch dmenu gives my an invalid pointer error lol
02:56:35FromDiscord<codic> How do I get *one* C file from a nim program?
02:56:38FromDiscord<Elegant Beef> Yea i need to figure out how to be properly compliant
02:56:47FromDiscord<Elegant Beef> what do you mean one C file?
02:57:01FromDiscord<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:01FromDiscord<codic> Compile one nim program to one c program
02:57:15FromDiscord<codic> @bedwardly-down True haha, just switched a week or two ago
02:57:32FromDiscord<codic> there were some hitches at the beginning but i managed to port everything to fish
02:57:43FromDiscord<bedwardly-down> Have you started using the function capabilities yet?
02:57:50FromDiscord<codic> Yup
02:58:06FromDiscord<codic> I used them to define `!!` since i often used it in zsh
02:58:16FromDiscord<bedwardly-down> I haven’t fully ported everything yet but am slowly moving over.
02:58:36FromDiscord<bedwardly-down> Alias being released was a godsend
02:58:49FromDiscord<Gary M> Hey bed what's your ide
02:59:05FromDiscord<codic> Argh I'm tryna get c 😢
02:59:16FromDiscord<Elegant Beef> he's going to say nvim
02:59:18FromDiscord<treeform> @codic I can always make nim faster. I like that about nim.
02:59:20FromDiscord<Elegant Beef> in 3..2...1
02:59:24FromDiscord<bedwardly-down> Me? No ide. I go straight ed with some script wrangling additions added
02:59:32FromDiscord<Gary M> What
02:59:38Prestigenvim here
02:59:41FromDiscord<codic> lmao
02:59:54FromDiscord<codic> My nimcache with my project has
02:59:55FromDiscord<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:55FromDiscord<codic> `
03:00:00FromDiscord<codic> Which one is the one I should be looking at
03:00:05FromDiscord<bedwardly-down> Ed and fish go hand in hand super well
03:00:10FromDiscord<codic> hahahaha
03:00:38FromDiscord<bedwardly-down> @Elegant Beef and @Gary M , did I catch you off guard?
03:00:54FromDiscord<Gary M> No I just don't know what that is
03:00:59FromDiscord<Elegant Beef> No i was close
03:01:08FromDiscord<bedwardly-down> Not close at all
03:01:16FromDiscord<Gary M> Probably super close
03:01:41FromDiscord<Elegant Beef> I mean close enough
03:01:47FromDiscord<Elegant Beef> TUI editor
03:01:48FromDiscord<bedwardly-down> Ed is what was built for computers that were made out of typewriters before screens appeared
03:01:50FromDiscord<Elegant Beef> Same thing to me
03:02:04FromDiscord<Gary M> Why are you masochistic
03:02:37FromDiscord<codic> .c
03:02:45FromDiscord<codic> file
03:02:47FromDiscord<codic> must
03:02:48FromDiscord<codic> be
03:02:50FromDiscord<codic> passed
03:02:50FromDiscord<codic> into
03:02:52FromDiscord<codic> codic@compiler
03:02:56FromDiscord<Gary M> Less spam please
03:03:02FromDiscord<codic> haha
03:03:09FromDiscord<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:19FromDiscord<codic> vi/vim
03:03:29FromDiscord<KingDarBoja> RIP IRC
03:03:33FromDiscord<Gary M> Rip
03:03:46FromDiscord<codic> I'ma just post this one more time and then go
03:03:46FromDiscord<codic> https://discordapp.com/channels/371759389889003530/371759389889003532/705614451919028224
03:03:47FromDiscord<Gary M> Does irc reflect delete events or something
03:03:49FromDiscord<bedwardly-down> I’m a freak, @Gary M
03:05:06FromDiscord<codic> irc doesn't have deleting iir
03:05:07FromDiscord<codic> irc doesn't have deleting iirc
03:07:00*sentreen quit (Ping timeout: 256 seconds)
03:07:31FromDiscord<codic> *IRC* *IIRC*
03:07:41FromDiscord<codic> welp. no response 😢
03:08:19FromDiscord<bedwardly-down> Rip ric
03:09:15FromDiscord<Zed> is there a way to make an array with an unditermined size?
03:09:28FromDiscord<Zed> actually that would be a sequence
03:10:15FromDiscord<Elegant Beef> yep arrays require a compiletime constant for the length
03:11:16FromDiscord<Elegant Beef> *Atleast that's what i understand, i have no clue why i speak*
03:11:28FromDiscord<codic> rip me
03:11:34FromDiscord<Zed> in compilation are sequences converted to arrays?
03:11:39FromDiscord<codic> I'ma just give this question another shot tommorow
03:12:32FromDiscord<Elegant Beef> I'd doubt it Zed, but againt i am a big ol' numpty
03:15:04FromGitter<bung87> no seq has store its size
03:20:47*sentreen joined #nim
03:22:47FromDiscord<Zed> How do you add a value to the sequence?
03:22:55FromDiscord<Zed> i cant find anything in the docs for it
03:22:58FromDiscord<bedwardly-down> Almost home. @Elegant Beef , I’ll see about getting nim setup and go from there
03:23:39FromDiscord<bedwardly-down> Doesn’t look like it would be hard to setup on my “arch btw” desktop. 😂
03:24:17FromDiscord<bedwardly-down> Although, Artix > Arch. 🤪
03:24:44disruptekzed: someseq.add somevalue
03:25:11FromDiscord<Zed> thanks disruptek
03:25:39disruptekseqs 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:01disrupteksome shit you just can't learn from a book.
03:26:22FromDiscord<Elegant Beef> Yea you will need to compile cimgui for the imgui stuff and get the required libs for nimgl
03:30:22FromDiscord<Gary M> sequences are like C# lists or C++ vectors.... basically
03:30:24FromDiscord<bedwardly-down> Why use imgui, though?
03:32:06FromDiscord<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:14FromDiscord<bedwardly-down> I don’t know how it is now
03:32:20FromDiscord<Elegant Beef> I mean cause im silly
03:32:26FromDiscord<Gary M> sequences are also allocated on the heap and gc'd
03:32:31FromDiscord<Elegant Beef> Im using it for the status bar for no real reason
03:32:46FromDiscord<Elegant Beef> *I went hey this could work ok, let's do it, and i did it*
03:32:49FromDiscord<Gary M> bed what would you do instead
03:33:25FromDiscord<Gary M> and do you mean specifically dear imgui being finicky, or the concept of immediate mode gui's being finicky?
03:33:56FromDiscord<Gary M> because really they're simpler to get things done in a basic program loop
03:35:52FromDiscord<Gary M> https://games.greggman.com/game/imgui-future/ haven't read this through yet but it gives some good comparison
03:36:45FromDiscord<bedwardly-down> Imgui was messy about 5 years ago. I haven’t followed it since
03:38:06FromDiscord<Gary M> Still I'm not sure what you mean by messy
03:39:22FromDiscord<Gary M> Unless you're referring specifically to an imgui library like dear imgui. That's not clear lol
03:40:37FromDiscord<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:36FromDiscord<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:57FromDiscord<Gary M> Unity's gui used to be an imgui
03:42:15FromDiscord<bedwardly-down> http://q-gears.sourceforge.net/
03:42:30FromDiscord<Gary M> Not a *dear imgui*, just an *immediate mode gui*
03:42:36FromDiscord<KingDarBoja> Guys I want to create a dictionary of heterogeneous values and string keys
03:42:47FromDiscord<KingDarBoja> But no idea, looking at the table modules examples
03:43:34FromDiscord<KingDarBoja> Let's say I want { "key1": int, "key2": seq[someType], "key3": Table[string,int] }
03:45:26PrestigeBeef: 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:51FromDiscord<Gary M> Wow sourceforge that's still a thing
03:46:07FromDiscord<Gary M> @Elegant Beef
03:47:07FromDiscord<Elegant Beef> Uhh
03:47:11FromDiscord<Elegant Beef> Weird
03:48:34FromDiscord<bedwardly-down> Honestly, one flaw i have is I’m super out of the loop in tech with many different things. 😰
03:49:20FromDiscord<bedwardly-down> Although, I’m always super on top of Linux issues that could make my pc use a nightmare at times. 🤪
03:50:24Prestigebed: You don't really use ed, do you?
03:52:45*chemist69 quit (Ping timeout: 240 seconds)
03:52:46FromDiscord<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:18FromDiscord<Rika> > Unity's gui used to be an imgui
04:02:18FromDiscord<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:33FromDiscord<bedwardly-down> Prestige, https://youtu.be/JXdShuIjvbs
04:17:01*jwm224 quit (Ping timeout: 264 seconds)
04:18:00*jwm224 joined #nim
04:25:35FromDiscord<Elegant Beef> damn
04:25:37FromDiscord<Elegant Beef> Madlad
04:28:40*thomasross quit (Ping timeout: 246 seconds)
04:29:05Prestigebedwardly wow
04:29:10Prestigeseems 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:02FromDiscord<bedwardly-down> It’s not. ☺️
04:43:52PrestigeWhy not use vim?
04:48:02FromDiscord<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:34PrestigeHuh, interesting
04:49:08FromDiscord<bedwardly-down> 🤷‍♂️
04:50:50FromDiscord<Gary M> @Elegant Beef hey you basically did guess right just that he *used to* use vim/nvim
04:51:16FromDiscord<Gary M> I'll chalk that up as beef - 1 / bedwardly - 0
04:51:27FromDiscord<Elegant Beef> Eh that's pretty common with linux users, especially those TWM users
04:52:15FromDiscord<Gary M> You would know that more than me
04:52:33FromDiscord<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:29FromDiscord<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:05FromDiscord<Gary M>
04:54:05FromDiscord<Gary M> https://cdn.discordapp.com/attachments/371759389889003532/705643181185695754/u8wa9kyh8jjy.jpg
04:54:06FromDiscord<Elegant Beef> Gotta make comments about how linux is a better designed developer environment wherever possible
04:54:32FromDiscord<bedwardly-down> It's not always better but does require a certain kind of madman. 😛
04:55:09FromDiscord<Elegant Beef> I mean for developers i'd say it's clearly better
04:55:47FromDiscord<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:00FromDiscord<Elegant Beef> lol
04:56:02FromDiscord<Elegant Beef> *Sorry* 😄
04:56:39FromDiscord<bedwardly-down> Also, nim is available in the Artix main repositories? Nice
04:58:39FromDiscord<Elegant Beef> I mean i say use choosenim always
04:58:43FromDiscord<Elegant Beef> Choosenim makes life great
05:01:21FromDiscord<bedwardly-down> *too lazy and tired to struggle with extra hard downloading of libraries*
05:01:23FromDiscord<bedwardly-down> 😛
05:01:31PrestigeBeef: I agree about Linux being a better dev env
05:01:41*rockcavera quit (Remote host closed the connection)
05:01:49FromDiscord<Gary M> choosenim is easy
05:03:48FromDiscord<bedwardly-down> Yeah, it's pretty easy. And adding it to my fish path is much easier than with Bash
05:06:36FromDiscord<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:27FromDiscord<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:53FromDiscord<Gary M> I will tell people to not get mac tho 😄
05:11:14FromDiscord<bedwardly-down> Hey, I loved the Mac I had years back. They have their benefits
05:11:27FromDiscord<Gary M> I don't see any benefits in 2020
05:11:40FromDiscord<Gary M> especially for game dev which is usually where my discussions are lol
05:11:48FromDiscord<bedwardly-down> Why I have an Iphone and Android phone at same time
05:11:54PrestigeIdk how anyone uses macs nowadays
05:11:57FromDiscord<Gary M> mac isn't ios though
05:12:01FromDiscord<bedwardly-down> That and tax write off for work
05:12:21FromDiscord<bedwardly-down> It's not, but Macs are still decent for Unix users especially
05:12:39FromDiscord<Gary M> then get a Unix compatible system for MUCH less $$$
05:12:54FromDiscord<bedwardly-down> That's pretty much all systems
05:13:00FromDiscord<Gary M> exactly
05:13:08FromDiscord<bedwardly-down> FreeBSD should run on most hardware
05:13:16FromDiscord<Gary M> so why is mac decent when it costs more
05:13:19FromDiscord<bedwardly-down> And Linux will run on most hardware
05:14:36FromDiscord<Rika> #offtopic (#nim-offtopic for irc)
05:14:43FromDiscord<Gary M> 👀
05:15:14FromDiscord<Gary M> cast[on-topic](off-topic)
05:15:23FromDiscord<bedwardly-down> I was starting with nim and they dragged me into the badlands. I'm a good boy, I swear
05:15:26PrestigeNice
05:15:50FromDiscord<Rika> :Doubt:
05:17:05FromDiscord<Rika> TIL nimble used to be called babel?
05:18:17FromDiscord<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:42FromDiscord<bedwardly-down> Choosenim, really? `Choose a job. Choose a mortgage. Choose life. Choose Nim.`
05:33:38FromDiscord<Rika> pff
05:34:53FromDiscord<bedwardly-down> @Elegant Beef, are you working on devel or stable?
05:35:09FromDiscord<Elegant Beef> #head
05:36:30FromDiscord<bedwardly-down> Nim's actual download TUI stuff is really poor...
05:37:37FromDiscord<bedwardly-down> You know what, I'm getting grumpy
05:40:17PrestigeBeef if you happen to look into dmenu launch in your wm, lmk if u find anything? I'll do the same
05:40:26Prestigejust have a few things to finish up before I get there
05:41:12FromDiscord<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:45PrestigeI 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:47FromDiscord<bedwardly-down> I've got it on on my system and it does the job
05:41:53PrestigeHaven't look into fixing it at all, yet
05:42:01FromDiscord<Elegant Beef> I use rofi
05:42:04FromDiscord<Elegant Beef> So i have rofi support
05:42:30FromDiscord<bedwardly-down> Prestige, what shell are you using and anything funky on the backend like XWayland or anything
05:42:40Prestigezsh, and nah
05:43:04Prestigerofi felt a bit slow to me, so I switched back to dmenu
05:43:09FromDiscord<bedwardly-down> I tried zsh the other day and spent two hours noping back into fish, so I don't know
05:43:30PrestigeI had to add a few extensions to make zsh usable
05:43:32FromDiscord<Yardanico> @Rika because Nim was called Nimrod
05:43:36Prestigehavent tried fish in ~10 yrs
05:44:00FromDiscord<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:01FromDiscord<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:08FromDiscord<Yardanico> Tower of Babel
05:44:35FromDiscord<Yardanico> It's references all the way down
05:44:39FromDiscord<Rika> hey i didnt question why it was called babel
05:44:45FromDiscord<bedwardly-down> Also, before anyone says anything, this discussion is about a nim based wm. 😄
05:45:00FromDiscord<Yardanico> I use Sway with Wofi and Waybar
05:45:26FromDiscord<Elegant Beef> Im currently using awesomewm but was using i3wm before
05:45:30PrestigeI'm planning on making the wm minimal, no bar or deps for a menu
05:45:32FromDiscord<Elegant Beef> I really just want alternating split
05:45:34FromDiscord<bedwardly-down> You using Wayland then? How's it working with your system? My drivers are whack with it
05:45:56PrestigeI keep hearing about issues with Wayland so I haven't even tried it :/
05:46:03FromDiscord<Yardanico> I have full AMD system
05:46:10Prestigebut if it becomes standard I'll port my wm to it
05:46:12FromDiscord<Yardanico> So of course Wayland works just fine
05:46:22FromDiscord<Yardanico> RX 570 + 3700X, I don't game much
05:46:58FromDiscord<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:39Prestigeim honestly expecting 15 yrs (if it becomes standard)
05:48:12FromDiscord<Yardanico> Well it already works quite well for a lot of stuff
05:48:31FromDiscord<Yardanico> For most applications it's a matter of updating the framework version they're using
05:48:41FromDiscord<Yardanico> Almost no applications use X directly nowadays
05:48:53FromDiscord<Yardanico> They use GTK, Qt, etc
05:48:59FromDiscord<bedwardly-down> True that.
05:49:00PrestigeTrue
05:49:07PrestigeOkay maybe sooner then
05:49:08FromDiscord<Yardanico> Also there's offtopic channel :)
05:49:36PrestigeWe were indirectly talking about nim, I'm making a WM with x11
05:59:37FromDiscord<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:07FromDiscord<Elegant Beef> `choosenim '#head'`
06:03:24FromDiscord<bedwardly-down> Not putting in single quotes is why I couldn't get it to work? O.o
06:03:34FromDiscord<Elegant Beef> yes
06:03:50FromDiscord<Elegant Beef> Idk it's what i have to do with my terminal
06:03:57FromDiscord<Elegant Beef> So could just be bash i guess 😄
06:04:24FromDiscord<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:49FromDiscord<Yardanico> @Elegant Beef no?
06:04:54FromDiscord<Yardanico> That's not how you do it
06:05:06FromDiscord<Yardanico> choosenim devel
06:05:33FromDiscord<Yardanico> Ah I see
06:05:36FromDiscord<Elegant Beef> I dont recall where i seen to do this but i know someone told me
06:05:39FromDiscord<Yardanico> Both will work
06:05:48FromDiscord<bedwardly-down> Naw. Choosenim devel got nightly but not master at head
06:05:59FromDiscord<bedwardly-down> At least that's what it showed on my end
06:06:38FromDiscord<Elegant Beef> Yea idk im a numpty
06:06:42FromDiscord<Elegant Beef> So no one should ever listen to me
06:07:03FromDiscord<Yardanico> Well Beef you're right
06:07:12FromDiscord<Never Listen To Beef> There a name to match my actual position here
06:07:21FromDiscord<Yardanico> I'm just a bit old styled so I have nim repo cloned
06:07:35FromDiscord<Yardanico> And do "sh build_all.sh" every so often
06:07:41FromDiscord<Yardanico> After git pull
06:07:48FromDiscord<Never Listen To Beef> ah
06:08:02FromDiscord<Yardanico> I remember the times when we didn't have build_all.sh :P
06:08:06FromDiscord<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:20FromDiscord<Yardanico> I don't really run cron :P
06:08:51FromDiscord<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:39FromDiscord<Zed> why does `for i in tape` not work but `for i in 0..tape.len` work, tape is a string
06:29:15FromDiscord<Zed> doesnt the first option do the same thing?
06:30:43FromDiscord<Never Listen To Beef> is tape a sequence?
06:31:06FromDiscord<Never Listen To Beef> the latter works cause it creates a range from 0 to tape.len
06:31:15FromDiscord<Never Listen To Beef> then it iterates over them
06:31:16FromDiscord<Zed> tape is a string
06:31:34FromDiscord<Rika> Are you sure the latter doesn't work
06:31:38FromDiscord<Zed> aren't strings natievly arrays?
06:31:45FromDiscord<Zed> yeah i was getting errors
06:31:52FromDiscord<Never Listen To Beef> you mean former rika
06:32:20FromDiscord<Never Listen To Beef> It works
06:32:20FromDiscord<Never Listen To Beef> https://play.nim-lang.org/#ix=2kgs
06:32:22FromDiscord<Rika> I've been awake for so long
06:32:28FromDiscord<Rika> You think I can think??
06:32:50FromDiscord<Rika> !eval for i in "test": echo i
06:32:53NimBott↵e↵s↵t
06:33:11FromDiscord<Rika> Works here too
06:34:01FromDiscord<Zed> https://play.nim-lang.org/#ix=2kgs
06:34:01FromDiscord<Zed> this is not working on the playground
06:34:01FromDiscord<Rika> What error are you exactly getting
06:34:17FromDiscord<Zed> type mismatch
06:34:25FromDiscord<Rika> It just did for me
06:34:30FromDiscord<Zed> proc `[]`(s: string; i: BackwardsIndex): char
06:34:30FromDiscord<Zed> first type mismatch at position: 0
06:34:30FromDiscord<Zed> proc `[]`[I: Ordinal; T](a: T; i: I): T
06:34:30FromDiscord<Zed> first type mismatch at position: 0
06:34:30FromDiscord<Zed> proc `[]`[Idx, T, U, V](a: array[Idx, T]; x: HSlice[U, V]): seq[T]
06:34:30FromDiscord<Zed> first type mismatch at position: 0
06:34:32FromDiscord<Zed> proc `[]`[Idx, T](a: array[Idx, T]; i: BackwardsIndex): T
06:34:34FromDiscord<Zed> first type mismatch at position: 0
06:34:36FromDiscord<Zed> proc `[]`[Idx, T](a: var array[Idx, T]; i: BackwardsIndex): var T
06:34:37FromDiscord<Zed> first type mismatch at position: 0
06:34:39FromDiscord<Zed> proc `[]`[T, U, V](s: openArray[T]; x: HSlice[U, V]): seq[T]
06:34:41FromDiscord<Zed> first type mismatch at position: 0
06:34:42FromDiscord<Zed> proc `[]`[T, U](s: string; x: HSlice[T, U]): string
06:34:44FromDiscord<Zed> first type mismatch at position: 0
06:34:46FromDiscord<Zed> proc `[]`[T](s: openArray[T]; i: BackwardsIndex): T
06:34:47FromDiscord<Zed> first type mismatch at position: 0
06:34:48narimiranyaaay, multiline paste
06:34:49FromDiscord<Zed> proc `[]`[T](s: var openArray[T]; i: BackwardsIndex): var T
06:34:51FromDiscord<Zed> first type mismatch at position: 0
06:34:52FromDiscord<Zed> template `[]`(s: string; i: int): char
06:34:54FromDiscord<Zed> first type mismatch at position: 0
06:34:55FromDiscord<Zed>
06:34:56FromDiscord<Zed> expression: [](tape, i)
06:34:58FromDiscord<Zed> that is in the playground
06:34:59FromDiscord<Rika>
06:35:01FromDiscord<Rika> https://cdn.discordapp.com/attachments/371759389889003532/705668559388540988/Screenshot_20200501-153445.jpg
06:35:03FromDiscord<Zed> is it all messed up?
06:35:24FromDiscord<Zed> im an idiot
06:35:33FromDiscord<Zed> i was trying to use i as an index
06:35:57FromDiscord<Zed> god im a dumbasss
06:35:57FromDiscord<Never Listen To Beef> I had seen that as an issue with that acessor
06:36:09FromDiscord<Rika> Name your variables more explicitly
06:36:12FromDiscord<Never Listen To Beef> Rather operator error
06:36:26FromDiscord<Rika> Literally make single letter variables an error for you
06:44:03*silvernode joined #nim
06:46:23FromDiscord<Yardanico> Also by the way guys
06:46:43FromDiscord<Yardanico> Did you know that Nim discord server actually has an audio channel which has never been used (afaik)
06:48:38FromDiscord<Zed> lol i just noticed that now you've pointed it out
06:53:06FromGitter<bung87> do I need packaging portable application as installer so application can have app icon? on Linux
06:53:25FromDiscord<Yardanico> On Linux your app doesn't really ship an icon in the binary
06:54:05FromDiscord<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:12FromGitter<bung87> yeah , it has entry file
06:55:11FromGitter<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:33skrylar[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:50FromGitter<bung87> @skrylar another topic?
07:09:11skrylar[m]i saw fish mentioned in the backlog
07:09:31FromGitter<bung87> OK
07:10:05FromGitter<bung87> maybe I'll try `snapcraft ` for packaging
07:10:23skrylar[m]appimages are pretty nice
07:11:05skrylar[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:20FromDiscord<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:44FromGitter<bung87> ok , I will consider it, I only left the linux app build step now, for mac ,win I already wrote scripts.
07:14:06skrylar[m]nothing stops you from putting the appimage in bin. they are just elf stubs with a squashfs image taped on
07:14:08FromGitter<bung87> mac is .app dir + plist, win just embed ico to exe, that's easier than linux
07:14:20FromDiscord<Zed> how could i read in output as input from a shell executed command?
07:14:36FromDiscord<Zed> if that mkes sense
07:14:41FromDiscord<Never Listen To Beef> Nothing stops it but i use a package manager so i dont have to do manual work 😄
07:14:56skrylar[m]foo | bar?
07:15:16FromGitter<bung87> @zed it make sense, it's about stdio pipline
07:15:26skrylar[m]or do you mean capturing stdout when running another process
07:15:49FromDiscord<Zed> the latter i think
07:17:06FromDiscord<Zed> i want to execute an executable from nim and read what it outputs to the console
07:17:56FromGitter<bung87> you can easy found article about this in python ,nodejs
07:24:22AraqZed: 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:02Araqfederico3, https://forum.nim-lang.org/t/6277 please have a look
08:00:21Araqit's & inside a title when it should be &amp;
08:00:56Araqinsert rant about "everything should be text (so that we end up with crazing quoting and escaping rules everywhere)" here
08:01:10Araq*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:08FromDiscord<Yardanico> @Araq also by the way, is there a way to make arc work with os:standalone, for example for nimkernel?
09:38:08FromDiscord<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:23FromGitter<pigmej> Heya
09:42:17FromGitter<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:40Araqyardanico: 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:54FromGitter<pigmej> ok the solution is to add `-static-libstdc++` to the scripts
10:22:30FromGitter<pigmej> now `could not load: libpcre.so(.3|.1|)` hmm
10:22:43Yardanicoyou need pcre for nim's "re" and "nre" modules to work
10:23:07FromGitter<pigmej> yeah the question how to ship it to ndk...
10:23:29dom96this is why I avoid dependencies at all costs
10:23:35Yardanicotry https://github.com/genotrance/nimpcre
10:23:36dom96you may have better luck using nim-regex
10:23:51*solitudesf joined #nim
10:23:51dom96(regex implemented in Nim)
10:24:05dom96or just not use regex at all :)
10:24:24FromGitter<pigmej> sadly I have to for that binary ;)
10:24:38FromGitter<pigmej> @Yardanico will check maybe that will help
10:27:08FromGitter<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:12FromGitter<Bennyelg> how do I get rid of it
10:27:33FromGitter<Yardanico> wdym "get rid of it"? where is that string from?
10:28:15*jwm224 quit (Ping timeout: 240 seconds)
10:28:54FromGitter<Bennyelg> its list of strings
10:28:59FromGitter<Bennyelg> as you can see or JsonNode
10:29:01FromGitter<Bennyelg> for that matter
10:29:29FromGitter<Bennyelg> Managed doing this: $(%*{"Students": studentsJsons})
10:33:48FromGitter<pigmej> crap
10:33:51FromGitter<pigmej> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5eabfb0f7975db7ebfd9c040]
10:33:57FromGitter<pigmej> will have to dig deeper ;/
10:34:17FromGitter<Yardanico> are you sure you read the readme correctly?
10:36:31YardanicoI 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:10Yardanicohad 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:46Yardaniconow 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:34FromGitter<pigmej> @Yardanico yeah I have set `-d:usePcreHeader`
10:41:14*jwm224 joined #nim
10:47:11*Ven`` joined #nim
10:48:17Yardanicohuh seems like all symbols are defined with ".hidden" because of PRs which made all symbols private :P
10:49:58FromGitter<pigmej> ;D
10:50:17Yardanicopigmej I honestly don't know much about pcre, you can try https://github.com/nitely/nim-regex
10:50:25Yardanicoit's a pure-nim regex lib, mostly compatible with pcre with a few exceptions
10:50:34Yardanicohttps://nitely.github.io/nim-regex/regex.html for docs
10:57:50*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:09:16Yardanicowell at last I managed to do it
11:09:49*NimBot joined #nim
11:13:18*dadada quit (Ping timeout: 260 seconds)
11:13:54Yardanicoalthough 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:34federico3Araq: 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:23Yardanicoseems like it crashes on var c = @[1, 2, 3], hmmm
11:46:26Yardaniconow how do I debug a kernel :DD
11:46:50Yardanicoat least I god COM1 hooked up so I can use good ol' echo debugging, although the kernel is a bit more unforgiving
11:57:02FromDiscord<bedwardly-down> What’s this about the kernel? I’d be intrigued on what you figure out with it
11:57:31Yardanicohttps://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:41Yardanicoso you could have strings and sequences and ref types in the kernel :DDDD
11:57:53FromDiscord<bedwardly-down> 👀
11:57:54Yardanicomanaged by a not-so-much-a-GC
11:58:17FromDiscord<Recruit_main707> if its a kernel, why os:any?
11:58:17*liblq-dev joined #nim
11:58:42Yardanicobecause os:any is better to use than os:standalone for most cases
11:58:43Yardanicoincluding kernel
11:59:09Yardanicowow so I actually can catch exceptions in kernel code
11:59:12*letto joined #nim
11:59:12Yardanicothat works
11:59:25Yardanicoalbeit that worked without gc:arc with nimkerne ltoo
11:59:40FromDiscord<Recruit_main707> and they say rust is the best for embeded devices
12:00:07Yardanicogood luck porting LLVM to your obscure microcontroller which only has some GCC cross-compile toolchain from 2015 ;)
12:00:18FromDiscord<bedwardly-down> Would test building it with clang have value to your endeavors?
12:00:39Yardanicohonestly I'm not experienced in osdev at all, I'm just tinkering around trying to glue things together :D
12:00:51Yardanicothere's https://wiki.osdev.org/LLVM_Cross-Compiler
12:00:55Yardanicoand maybe I should try clang
12:02:06FromDiscord<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:20FromDiscord<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:34FromDiscord<bedwardly-down> Also, is this only specific to 32 bit or has anyone tried to compile for a 64 bit arch?
12:03:40Yardaniconimkernel is 32-bit only
12:03:51Yardanico64-bit is a bit more complicated
12:03:52Yardanicohttps://wiki.osdev.org/Creating_a_64-bit_kernel
12:03:54FromDiscord<bedwardly-down> Thanks. reading the config file
12:04:00Yardanicowell not that much really
12:04:40FromDiscord<bedwardly-down> I'm assuming that nimkernel's main focus was embedded systems and whatnot?
12:04:51Yardanicoit was to show that nim can be used to create a kernel :)
12:05:21FromDiscord<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:28FromDiscord<bedwardly-down> Time to RTFM. I'm getting make errors right of the bat about non existent thing a ma bobs
12:09:41Yardanicowell I don't think you'll be able to build JackOS as-is
12:09:52Yardanicoit for some reason has --gc:arc in nim.cfg but it doesn't really work with that
12:10:49FromDiscord<bedwardly-down> Sweet. The original dev was on Arch Linux, so we know it at lwast was tested on something sane. /s 😛
12:12:04FromDiscord<bedwardly-down> Is #offtopic not tied to the gitter also?
12:12:09Yardanicoit is tied
12:12:39FromDiscord<bedwardly-down> Gotya
12:15:41*abm joined #nim
12:16:39FromDiscord<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:51Yardanicoyeah as I said JackOS doesn't really compile with --gc:arc
12:16:58Yardanicoyou need --os:any to compile with --gc:arc
12:17:00Yardanico(at least)
12:17:07Yardanicoand in JackOS you need to change more things
12:17:21YardanicoI kinda fixed it but the kernel simply crashes when I try to create a seq, I already created a fork though
12:17:36FromDiscord<bedwardly-down> Gotya. Your username the same?
12:17:39Yardanicoyes
12:17:53Yardanicobut you also need to patch some stuff in nim system module files :P
12:18:27FromDiscord<bedwardly-down> Fuuuuuu... I mean, I need coffee. Bring it on!!!!
12:19:01FromDiscord<bedwardly-down> And easy enough, you are the only fork of it period
12:19:27FromDiscord<bedwardly-down> So, now I fork thee. 😛
12:21:34FromDiscord<bedwardly-down> Why is i686-elf-gcc being used?
12:21:53Yardanicobecause it's a cross-compiler for 32-bit freestanding
12:21:59Yardanicohence no "gnu" in name
12:22:50FromDiscord<bedwardly-down> Ah. I thought Santa was in the house, yo
12:23:48FromDiscord<bedwardly-down> I always thought elf was primarily for embedded systems. Interesting
12:24:19FromDiscord<bedwardly-down> That's also the bare amount I've done cross-compiling for and that was way too long ago
12:27:51FromDiscord<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:20Yardanicowell I don't really know now :)
12:28:26Yardanicobut I pushed a new commit with some notes
12:28:43FromDiscord<bedwardly-down> Checking into that
12:29:02*rockcavera quit (Remote host closed the connection)
12:29:56FromDiscord<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:14FromDiscord<bedwardly-down> Think Arch version of Ubuntu
12:30:23Yardanicoyou don't need aur
12:30:39Yardanicoah right you do
12:30:40FromDiscord<bedwardly-down> You build from source?
12:31:02Yardanicoactually nvm
12:31:14Yardanicoif you don't want to build from source, you can add chaotic-aur unofficial arch repo
12:31:18Yardanicoi686-elf-gcc is there
12:31:43FromDiscord<bedwardly-down> I'll build from source. 😛
12:32:22FromDiscord<bedwardly-down> Building isn't hard. It's just usually a bit more time consuming. 😄
12:32:24*tane joined #nim
12:33:35FromDiscord<bedwardly-down> So, is gcc hardcoded into JackOS or would I be able to just change that?
12:33:58FromDiscord<bedwardly-down> Also, those notes are good.
12:34:12FromDiscord<bedwardly-down> Actually, really good. 😄
12:34:51Yardanicowell they all can be fixed with PRs to Nim itself, although they need to be done more properly
12:36:09FromDiscord<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:17Yardanicoyeah
12:36:22Yardanicokinda :P
12:40:34FromGitter<bung87> is there alternative `windres` on macos?
12:40:58Yardanicoyou want to have a macos app with icon?
12:41:03Yardanicothen you'll have to create a proper macos app :P
12:41:13Yardanicosee https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html#//apple_ref/doc/uid/10000123i-CH101-SW1
12:41:36Yardanicooh sorry that's for ios
12:41:53FromGitter<bung87> no , on macos for win
12:41:59Yardanicohm
12:42:19FromDiscord<bedwardly-down> You're wanting to cross-compile from mac to win, bung?
12:42:21FromGitter<bung87> i searched using bing and github
12:42:22Yardanicoit might be available with mingw
12:42:59FromDiscord<bedwardly-down> Bung, did you see the link I posted earlier about clang-mingw?
12:43:07FromGitter<bung87> I saw the mingw offical site, macos doesnot contains windres,
12:43:22federico3now that type hinting is becoming more common in Python, a good py2nim translator could be doable
12:43:32FromGitter<bung87> I have not seen
12:43:49FromDiscord<bedwardly-down> https://github.com/mstorsjo/llvm-mingw
12:44:25FromDiscord<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:32FromGitter<bung87> wow , it has a llvm-windres could be used
12:45:58FromGitter<bung87> https://github.com/mstorsjo/llvm-mingw/blob/master/wrappers/windres-wrapper.c#L79
12:46:37Yardanicook
12:46:40FromDiscord<bedwardly-down> 😄
12:46:40Yardanicoapparently I'm getting a triple fault
12:46:49Yardanico"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:50Yardanicowtf
12:49:12FromDiscord<bedwardly-down> Damn. Even though I changed the compiler settings to clang in the config, it's begging for i686-elf-gcc
12:49:21Yardanicoit's not that simple
12:49:26FromDiscord<bedwardly-down> Did you change it elsewhere that I missed?
12:49:27Yardanicoand you need to change it in Makefile
12:49:36FromDiscord<bedwardly-down> Gotya
12:51:48FromGitter<alehander92> Yardanico awesome
12:52:00FromGitter<alehander92> i just wanted to study / work on my toy kernel
12:52:09FromGitter<alehander92> oh yeah this happens often!
12:52:14FromGitter<alehander92> the triple fault thing
12:52:20Yardanicowell how do I debug it? :D
12:52:22FromGitter<alehander92> basically there is
12:52:32FromGitter<alehander92> one other nim kernel which does the interrupt things ok and it worked
12:52:49FromGitter<alehander92> but it uses the GPL3 License
12:52:49Yardanicohttps://github.com/samanthadoran/Mero ?
12:52:49FromGitter<alehander92> https://github.com/samanthadoran/Mero
12:52:59Yardanicohah
12:52:59FromGitter<alehander92> yeaa, i actually mailed the woman who wrote it
12:53:11FromGitter<alehander92> because it didnt have a license file before iirc
12:53:19FromGitter<alehander92> she seemed pretty welcoming
12:53:31FromGitter<alehander92> so afaik she studied from osdev etc and based it on it
12:53:41FromGitter<alehander92> and i managed to integrate it in my one
12:53:47FromGitter<alehander92> but now i decided to do it myself
12:54:00FromGitter<alehander92> and dont use so much of others code
12:54:05FromDiscord<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:08FromGitter<alehander92> but if you're mostly interested in the language in the toy
12:54:11FromGitter<alehander92> kernel
12:54:17FromGitter<alehander92> you can run it without all that stuff?
12:54:22Yardanico?
12:54:35FromGitter<alehander92> you can just start it similarly to dom96's one
12:54:50Yardanicowell the point is that I want to make it work with --os:any --gc:arc
12:55:01FromGitter<alehander92> okkk
12:55:05FromGitter<alehander92> yes i think i did
12:55:06FromGitter<alehander92> you know what
12:55:09Yardanicoand it actually compiles after commenting some stuff
12:55:18Yardanicobut does a triple fault when I try to create a seq
12:55:18FromGitter<alehander92> i planned on streaming a bit of my playing/studying with it
12:55:20Yardanicoat runtime
12:55:32FromGitter<alehander92> i can try to see if it really works on my setup
12:55:39FromDiscord<bedwardly-down> Outside of building custom linux kernels, this is brand new to me
12:55:41FromGitter<bung87> @bedwardly-down yeah , please I have not install it for now, any thing I should noticed?
12:55:59Yardanicoalso exception handling with arc works (I mean it worked with old nimkernel too)
12:56:13Yardanicoalthough getStackTrace() causes the kernel to crash too (getCurrentExceptionMsg works)
12:56:52FromDiscord<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:20Yardanicoas I said you can use chaotic-aur unofficial arch repo so you don't have to compile yourself
12:57:29Yardanicoor install from AUR with compilation from source :P
12:57:45FromGitter<alehander92> Yardanico i manged
12:57:49FromGitter<alehander92> to build gcc binutils
12:57:51FromGitter<alehander92> i think
12:57:56Yardanicowell it's not an issue for me really
12:57:58FromGitter<alehander92> and i planned to use their cross compiler
12:58:11Yardanicooh wait there's also https://github.com/pascalmouret/assyria
12:58:16YardanicoMIT
12:58:32FromGitter<alehander92> yeah but "current goals"
12:58:36FromGitter<alehander92> are similar to ours now :P
12:58:39Yardanicouh
12:58:50Yardanicohttps://github.com/mikra01/nimkernel_ext
12:58:55YardanicoMIT
12:58:59Yardanico"basic gdt/idt/pic init"
12:59:24FromGitter<alehander92> ok
12:59:29FromGitter<alehander92> Yardanico i planned
12:59:32FromGitter<alehander92> to
12:59:41FromGitter<alehander92> refactor those to simple package
13:00:00FromGitter<alehander92> so one can add `x86` or `gdt_etc` or something like that
13:00:01FromGitter<bung87> @bedwardly-down that's fine, I will spawn process wait and pass to nim c
13:00:03FromGitter<alehander92> in his package
13:00:08FromGitter<alehander92> and directly start working on top of that
13:00:20FromGitter<alehander92> because i saw that people did something like that in rust
13:00:49FromGitter<alehander92> something like https://docs.rs/x86_64/0.10.1/x86_64/
13:01:01Yardanicohuh
13:01:03FromDiscord<bedwardly-down> I'm getting somewhere here
13:01:04FromGitter<alehander92> but maybe just for x86
13:01:10FromGitter<bung87> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5eac1d960b23797ec056b31a]
13:01:28FromGitter<alehander92> Yardanico but again, this shouldn't be needed to just see if sequences work
13:01:31FromDiscord<bedwardly-down> Comments require space or they are ignored?
13:01:32FromGitter<alehander92> they *should* work
13:01:37Yardanicoyeah right
13:01:39FromGitter<bung87> I was trying to do this, then I realise mingw-64 does not contain windres
13:01:54FromGitter<alehander92> i managed to run with `--gc:newruntime` or something like that before
13:01:57FromGitter<alehander92> iirc
13:02:05FromGitter<alehander92> but it was harder
13:02:10Yardanicowell they seem to work with --gc:none --exceptions:goto :P
13:02:13Yardanicobut it crashes later anyway
13:02:18FromGitter<alehander92> but how does it crash
13:02:22Yardanicoon trying to convert an int to a string and concat with another strng
13:02:26Yardanicowell kinda like a reboot
13:02:36FromGitter<alehander92> oooh
13:02:41FromGitter<alehander92> yeah those invoke some internal stuff
13:02:43FromGitter<alehander92> so IIRC
13:02:49FromGitter<alehander92> i needed to also provide a libc.c file
13:02:56FromGitter<alehander92> and link it with my nim produced c files
13:03:01Yardanicowell I did --define:nimNoLibc
13:03:05Yardanicoand yes that works
13:03:13FromGitter<alehander92> hm, but what does it invoke then
13:03:17Yardanicofor wat?
13:03:17FromGitter<alehander92> for allocation etc
13:03:27FromGitter<alehander92> it has to somehow get memory
13:03:28Yardanicofunctions implemented in nim itself :P
13:03:35FromGitter<alehander92> but they have to call something
13:03:51Yardanicoyes
13:03:56Yardanicothey are implemented in nim itself
13:04:01Yardanicoif useLibC is false
13:04:08FromGitter<alehander92> but what do they do
13:04:11Yardanicohttps://github.com/nim-lang/nim/blob/devel/lib/system/memory.nim
13:04:15FromGitter<alehander92> they dont just go "lets return a random pointer"
13:04:33FromGitter<alehander92> hm yeah, but i wonder
13:04:34FromGitter<alehander92> about alloc
13:04:42Yardanicoah about alloc
13:04:45Yardanicoit's in osalloc.nim
13:04:47FromGitter<alehander92> huh but that is good yeah
13:04:55Yardanicohttps://github.com/nim-lang/nim/blob/devel/lib/system/osalloc.nim#L277
13:04:59Amun_Raare items in seq contiguous?
13:05:12Yardanicoif you pass -d:StandaloneHeapSize:1234 it'll compile this block
13:05:31Yardanicomaybe that's why it's failing for me though
13:05:38Yardanicomaybe I've passed an invalid size or something
13:06:15Amun_Rahmm, it seems not
13:06:49FromGitter<alehander92> ohhh
13:06:55FromGitter<alehander92> yeah i think i changed that in my nim!
13:07:00Yardanicoreally?
13:07:00FromGitter<alehander92> to 1 ? or something
13:07:05FromGitter<alehander92> yeah i just patched it
13:07:10Yardanicochanged what exactly? :P
13:07:22FromGitter<alehander92> wow
13:07:29FromGitter<alehander92> i think i made my own global pointer
13:07:57FromGitter<alehander92> ok
13:08:08FromGitter<alehander92> good stuff
13:08:17FromGitter<alehander92> so then i am not sure what happens
13:09:10FromGitter<alehander92> how much is PageSize ?
13:09:21Yardanicoseems to be 4096 actually
13:09:27YardanicoPageShift = when defined(cpu16): 8 else: 12 and PageSize = 1 shl PageShift
13:09:34Yardanico!eval echo 1 shl 12
13:09:36NimBot4096
13:09:53FromGitter<alehander92> that is not much at all
13:09:55Yardanicoso it's 4mb
13:09:57FromGitter<alehander92> no i mean it is
13:10:07Yardanicowell I passed 16384 :P
13:10:18FromDiscord<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:19FromGitter<alehander92> ok so you can
13:10:23FromGitter<alehander92> gdb it i
13:10:24*couven92 quit (Quit: Client Disconnecting)
13:10:34FromGitter<alehander92> awesome
13:10:37*zacharycarter joined #nim
13:10:45*fredrikhr joined #nim
13:11:17Yardanicoalso I have serial hooked up and I made a simple debug template to understand where the code stops working :P
13:11:44FromGitter<alehander92> https://wiki.osdev.org/Kernel_Debugging
13:11:48FromGitter<alehander92> look at gdb
13:11:49FromGitter<alehander92> ah ok
13:11:54FromGitter<alehander92> are you running it on hardware
13:11:58Amun_Rahmm, 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:02Yardanicoqemu
13:13:16FromGitter<alehander92> is there a way
13:13:21Yardanicowell seems like it can actually allocate ref objects at runtime
13:13:22FromGitter<alehander92> to somehow log something
13:13:25YardanicoI just tried creating a ref object
13:13:27FromGitter<alehander92> yeah it should
13:13:39FromGitter<alehander92> coming it 5 min
13:16:27AraqAmun_Ra, they are continguous
13:17:32FromDiscord<bedwardly-down> Chaotic-AUR was super easy to setup. Thanks...
13:17:57FromDiscord<bedwardly-down> Let's see if I can help figure this out
13:17:58YardanicoAraq: so about --os:any --gc:arc - there are two places in mmdisp and one in excpt.nim which require IO
13:18:37Yardanicommdisp.nim 65 and 66 (quit isn't there on --os:any either I guess) and excpt.nim 45
13:19:27Yardanico"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:28FromDiscord<bedwardly-down> I'm getting a stdio.h header missing error
13:19:37Yardanicocheck my notes
13:19:40Yardanicoyou should do all 4 patches :P
13:19:49*Cadey quit (Disconnected by services)
13:20:03Yardanicoso 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:05FromDiscord<bedwardly-down> I didn't pull them in
13:20:14Yardanicoi mean in the notes
13:20:18*Guest30980 joined #nim
13:20:33FromDiscord<bedwardly-down> In the notes in the repo, right?
13:20:36Yardanicoyes
13:20:39Yardanicoat the bottom of readme
13:22:40FromDiscord<bedwardly-down> I'm guessing these changes are for the actual language and not the kernel?
13:23:09Yardanicoyep
13:23:17Yardaniconimfolder is where your nim source folder is located
13:24:27FromDiscord<bedwardly-down> Ok, so I need to download the repo itself
13:24:48FromDiscord<bedwardly-down> I don't have the source, just the binaries
13:24:56Yardanicowell you have the "source"
13:24:59Yardanicoyou always have it
13:25:09Yardanicosince stdlib modules are just .nim files
13:25:11Yardanicosame for system
13:25:19FromDiscord<bedwardly-down> I don't know what that means
13:26:09Yardanicowell how did you install nim?
13:26:14FromDiscord<bedwardly-down> Gotya. Misread part of that
13:26:17FromDiscord<bedwardly-down> Choosenim
13:26:48Yardanicothen these files will be somewhere in ~/.choosenim/toolchains/nim-ver/
13:26:56Yardanicover is the version you've installed
13:27:06FromDiscord<bedwardly-down> Gotya. I was looking in the wrong folder
13:28:12FromDiscord<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:19FromDiscord<bedwardly-down> or version, I mean
13:28:21Yardanicowell I'm on devel
13:28:34Yardanicobut there isn't really much to test
13:29:15FromDiscord<bedwardly-down> So, nim isn't a bleeding edge breaks everything kind of language?
13:29:17zacharycarterwhy does choosenim have so many tendrils into my machine and why is not removing ~/.choosenim from my system enough
13:29:26zacharycarternow any time I try to install a nimble package I get an error about choosenim
13:29:32Yardanico!bedwardly-down nim is over 1.x already
13:29:36Yardanico1.0 i mean
13:30:06FromDiscord<bedwardly-down> I'm used to different languages having the master branch be incompatible with stable, so 😛
13:30:08dom96zacharycarter, what errors are you getting?
13:30:21dom96there are only two places that choosenim touches: ~/.choosenim and ~/.nimble/bin
13:30:39zacharycarteryeah I've removed both of those
13:30:41zacharycarterbut - 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:56dom96running what? `nimble` or `nim`?
13:31:00zacharycarternimble install nimterop
13:31:06dom96which nimble
13:31:21zacharycartermaybe it's the nimble that was installed with choosenim?
13:31:28zacharycarterI can't even run nimble -v now
13:31:30dom96did you copy it?
13:31:44zacharycarterno - let me just try removing nimble and installing it with ./koch tools
13:31:53dom96well, where is it then?
13:32:01zacharycarteroh okay - if I remove ~/.nimble I stop getting that error message
13:32:05dom96you say you've removed ~/.nimble/bin
13:32:13dom96but yeah, you haven't :)
13:32:13zacharycarterno I just removed choosenim from there
13:32:18zacharycarternot nimble itself
13:32:21zacharycarterbut now I have :)
13:32:28dom96yes, choosenim puts binaries there
13:32:38zacharycarterah okay - thanks for the help and explanation :)
13:33:05FromGitter<kaushalmodi> At work, I deploy nim by simply untarring the nim release tarball: http://ix.io/2kiD/sh
13:33:26zacharycarterwell I liked choosenim but I wanted to install a specific branch of the Nim repo and I couldn't figure out how
13:33:51FromDiscord<Zed> has anybody done intense numerical computing with nim?
13:34:03zacharycarteryes
13:34:12zacharycarterbut I don't know what you consider intense numerical computing?
13:34:24dom96zacharycarter, choosenim #branch_name
13:34:36zacharycarterhmm I tried that but couldn't get it working
13:34:45zacharycarterI tried wrapping #branch_name in double quotes as well
13:34:58dom96it should work, bug report? :)
13:35:05zacharycartersure - I will try to reproduce
13:35:14FromDiscord<Zed> large machine learning datasets
13:35:30zacharycarterZed: maybe check out arraymancer and nimdata and numforge/laser
13:35:54FromDiscord<bedwardly-down> Yar, I think there's a slight typo in your notes. Line 45 of excpt.nim is not the same
13:35:56zacharycarterthere 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:26Yardanicosystem/excpt.nim:45 ?
13:36:29FromDiscord<bedwardly-down> I did find multiple showErrorMessages, though
13:36:31FromDiscord<bedwardly-down> Yup
13:36:32YardanicoI just checked and it is
13:36:39Yardanicoyou just need to replace the one on line 45
13:36:40FromDiscord<Zed> thanks zac!!
13:36:42Yardanicowith "discard"
13:36:46zacharycarterZed: np
13:36:48Yardanicono need to touch others
13:37:05FromDiscord<bedwardly-down> Let me look at it again because I found a different line altogether
13:37:30FromDiscord<bedwardly-down> `writeToStdErr(data)`
13:37:41Yardanicoah right
13:37:44FromDiscord<bedwardly-down> That's what's showing on line 45
13:37:45Yardanicoreplace that
13:38:13FromDiscord<bedwardly-down> Gotya. You put the wrong info in notes.
13:38:20Yardanicoas I said thought it doesn't really work now
13:38:35Yardanicoyou'll simply get a kernel which reboots after writing some stuff to the serial
13:40:16zacharycarterdom96: it worked :) I think last night I was trying choosenim install but `choosenim "#branch_name"` works
13:40:21zacharycarteruser error
13:40:36FromDiscord<bedwardly-down> Not quite. I gotta add some extra software to finish building
13:41:46dom96zacharycarter, feel free to make an issue to improve the error message when trying `install`
13:41:57zacharycarterwill do
13:43:56FromDiscord<bedwardly-down> So running jackos.bin is giving a SIGSERVER Address Boundary Error, right?
13:44:35FromDiscord<bedwardly-down> And that's also the tiniest kernel I've seen. 112kb? O.o
13:44:57zacharycarteroooo people are writing kernels in Nim atm?
13:45:10FromDiscord<bedwardly-down> Wanna join the fun?
13:45:16FromDiscord<bedwardly-down> https://github.com/Yardanico/JackOS
13:45:30Yardanicothere's no fun until it works with --gc:arc properly :P
13:45:36Yardanico@bedwardly-dow umm no?
13:45:43Yardanicoyou're supposed to do "make build" and then "make run"
13:45:46Yardanicoand it'll run with eqmu
13:45:58FromGitter<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:00Yardanico"make build" is supposed to make an .iso
13:46:08FromGitter<alehander92> :)
13:46:12FromGitter<alehander92> Yardanico
13:46:14FromDiscord<bedwardly-down> I forgot to do make run. 😛
13:46:17Yardanico@alehander92 ?
13:46:20FromGitter<alehander92> i'll try to run now mine
13:46:24FromDiscord<bedwardly-down> I'm getting coffee
13:46:27FromGitter<alehander92> did you guys make it work
13:46:34Yardanicowell no :D
13:47:06FromGitter<alehander92> oh praise God what a day is today
13:47:12FromGitter<alehander92> we got an earthquake
13:47:20FromGitter<alehander92> and then an amazing afternoon
13:47:22*abm quit (Ping timeout: 260 seconds)
13:47:30zacharycarterso can all these updates just go back into nimkernel?
13:47:34FromGitter<alehander92> i really felt this 5.0
13:47:42Yardanicozacharycarter: if they're stable enough, maybe I'll try
13:47:49FromGitter<alehander92> Yardanico my goal was
13:47:50Yardanicobut https://github.com/watzon/JackOS itself is a fork of nimkernel
13:47:56zacharycarterlol yeah - but I wonder why
13:47:58FromGitter<alehander92> to eventually add `async` / `await`
13:48:02Yardanicowow
13:48:03FromGitter<alehander92> to the toy kernel
13:48:07Yardanicolool
13:48:11zacharycarterif all he did was bring it up to date with the current Nim and add a makefile
13:48:12Yardanicoimagine a kernel with async
13:48:16FromGitter<alehander92> like a form of cooperative multitasking
13:48:19FromGitter<alehander92> yeah thats my idea
13:48:23FromGitter<alehander92> it seems not hard
13:48:37FromGitter<alehander92> basically the idea is to get the interrupts / setup to the point where one can
13:48:58FromGitter<alehander92> when i think about it you dont even really need this actually
13:49:03dom96You guys are making me tempted to live stream updating nimkernel
13:49:14FromGitter<alehander92> i am going to live stream working on my kernel
13:49:17zacharycarteryou should
13:49:28Yardanicodom96: well it's not that hard :P but I hope we can make it work with --gc:arc --os:any
13:49:31Yardanicothat'll be amazing
13:49:33Yardanicostrings/seqs/etc
13:49:34FromGitter<alehander92> but we can just all fix the same kernel :D
13:49:58FromGitter<alehander92> dom96 go go
13:50:11AraqYardanico, well you need the heap emulation but then it shouldn't be a problem
13:50:11Yardanicoi mean it already boots with --os:any --gc:arc but seqs don't work, or stack traces
13:50:23FromGitter<alehander92> hmm
13:50:43YardanicoAraq: is it correct that I should be setting StandaloneHeapSize for --os:any ?
13:50:57Araqyeah but maybe more is required
13:51:20dom96Yardanico, yes, well, in that case I might add some more features :P
13:51:37Yardanicodom96: well I already added serial writing, it's really easy
13:51:44Araqit's only viable for a toy OS, in a real OS you should have kalloc/malloc offered by your kernel
13:52:07FromDiscord<bedwardly-down> We have something
13:52:07FromDiscord<bedwardly-down> https://cdn.discordapp.com/attachments/371759389889003532/705778580365246544/20200501_08h52m07s_grim.png
13:52:15Yardanicoyeah check serial.log
13:52:43FromGitter<alehander92> @dom96 do it!
13:52:58Yardanicoor you can just remove all lines in main which start/or are in the "debug" block
13:53:01FromGitter<alehander92> my plan was to basically simulate a process system
13:53:08Yardanicoso it's let attr = stuff, and then writeString ...
13:53:27FromGitter<alehander92> using nim functions as processes ⏎ ⏎ ``` async/await + cancellation for multitasking``` [https://gitter.im/nim-lang/Nim?at=5eac29d79ac8ce14a5944013]
13:53:45FromGitter<alehander92> and their types for protecting access to data structures/filesystem
13:54:36disruptekballs.
13:54:51FromDiscord<bedwardly-down> I have a blank serial.log. O.o
13:56:07FromGitter<alehander92> so e.g. you do stuff like let res = await fs.write(myPath, structuredObject)
13:56:39FromGitter<alehander92> and e.g. all stuff in the filesystem is just structured values (and maybe strings/binary as a subcase)
13:56:52FromDiscord<bedwardly-down> Toy kernels a common thing for you guys? I didn't even know those were a thing
13:57:02Yardaniconot really :D
13:57:04FromGitter<alehander92> no, it's all talk for me
13:57:10dom96what I would love is write an OS for the RPI
13:57:33dom96perfect way to run your toy kernel on real hardware
13:57:36Yardanicoblob:https://imgur.com/e8f6c72d-6af9-414c-8b04-3be994ced124
13:57:51Yardanicodom96: https://github.com/andrewrk/clashos :D although it only shows hello world
13:57:53FromGitter<alehander92> @dom96 the cool thing is you can write a custom macro async which generates
13:58:05FromGitter<alehander92> cooperative switching between the os tasks
13:58:08*liblq-dev quit (Ping timeout: 246 seconds)
13:58:08Yardanicobut zig's author made a cool post about adding stack trace support for barebones target
13:58:11FromGitter<alehander92> i saw it in rust
13:58:18FromGitter<alehander92> and i wanted to play with that since that
13:58:34FromGitter<alehander92> https://os.phil-opp.com/async-await/#cooperative-multitasking-1
13:58:42FromDiscord<bedwardly-down> Honestly, I think this is cool as hell
13:58:52Yardanicohttps://i.imgur.com/ObUQPNV.png i meant
13:59:21FromDiscord<bedwardly-down> I'm learning a game framework that is built around the structure of a kernel
13:59:40Yardanicothe era has ended... https://github.com/nim-lang/Nim/commit/9c33bcac5c73f8188e1c017ba8b2a14db5d5a4fe
14:00:19*liblq-dev joined #nim
14:00:51Araqif 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:16Yardanicowell I don't really want to since I have far less experience than required for proper kernels and OSes :D
14:02:02Araqthe 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:08dom96if you want to be practical then your best bet is to write on top of Linux or BSD
14:02:14Yardanicoyeah i guess so
14:02:21YardanicoFreeBSD steals drivers from Linux though :D
14:02:34FromDiscord<bedwardly-down> I wonder if using Callistios would be a good place to learn too. You know that project?
14:02:36Araqor steal code from the unikernel projects
14:02:44dom96The evidence that it works is out there, AFAIK PS4 OS is based on BSD
14:02:49Yardanicoyeah
14:02:53Araqyup, it is
14:03:04Yardanico"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:10FromDiscord<bedwardly-down> KallistiOS is a Dreamcast OS
14:04:07FromDiscord<bedwardly-down> Wait, what? PS4 uses that?
14:04:24AraqPS4 is based on BSD, yeah
14:04:31FromGitter<alehander92> Araq the funny thing is to write some very custom
14:04:33FromGitter<alehander92> stuff
14:05:20Yardanicobtw 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:41Yardanicowhile it's not that low, it still allows for all your usual seqs and stuff unlike gc:none
14:06:21Yardanicoah also --panics:on
14:06:30AraqYardanico, also use -d:noSignalHandler --panics:on
14:07:13Yardanicowith no signal handlers it's 17.7kb :P
14:07:18Yardanicofully static
14:07:31Yardanicoand yes I'm using zig to cross-compile for x86_64-linux-musl
14:07:54FromDiscord<bedwardly-down> I haven't tried musl for anything. How is it?
14:08:21disrupteklike compromising with wayland... but on steroids.
14:08:36Yardanicoyeah musl is usually used when you want static binaries :P
14:08:54FromDiscord<bedwardly-down> I just set up Wayland out of fear and anxiety this morning. Haha
14:08:56Yardanicoor when you have limited memory I guess
14:09:11disruptekthat's why i used it as an example.
14:09:23FromGitter<alehander92> Yardanico wow you do use zig
14:09:34Yardanicoyes it actually works for cross compiling stuff
14:09:49AraqI'd write my own libc in Nim but I can't be bothered
14:09:57FromDiscord<bedwardly-down> I use ED to write code in, so that's just as nuts I would think
14:09:59Yardanicoit's just clang with headers for different libcs and with musl sources :P
14:10:12FromGitter<alehander92> btw guys
14:10:23FromGitter<alehander92> how do you pass a custom c compiler
14:10:24FromGitter<alehander92> to nim
14:10:26Araqin fact, Nim doesn't use much out of libc anyway
14:10:38Yardanico@alehander92 if it's compatible with gcc/clang, then you just do stuff like gcc.exe.path
14:10:41Araqalehander92: --gcc.exe=blah
14:10:42FromGitter<alehander92> writing a minimal libc is not too hard i think
14:10:42Yardanicoor clang.exe.path
14:10:45FromGitter<alehander92> ahh thanks!
14:10:52Yardanicoor just port musl to Nim :P
14:11:04Yardanicoit's MIT
14:11:06FromDiscord<bedwardly-down> Thanks, Yar
14:11:30Araqyeah but musl probably uses 1000 lines of code to figure out which integer type to typedef
14:11:31dom96Araq, sounds fun. You should post a call for action. I've seen lots of people writing libc implementations for fun
14:11:55Yardanicoim actually curious how big musl is hmm
14:11:56disrupteki wrote a package manager for fun.
14:12:03disruptekoh wait, no.
14:12:05FromGitter<alehander92> musl was a *lot* of work
14:12:07FromGitter<alehander92> afaik
14:12:29Yardanicocloc says it's 50k of C and 30k of C headers (with 6k assembly), and that's ofc excluding comments/blank lines
14:12:30FromDiscord<bedwardly-down> I wonder how musl compares to eglibc and dietc?
14:12:32FromGitter<alehander92> for a custom kernel i'd love to just see random designs
14:12:40FromGitter<alehander92> different syscall schemes and all of that
14:12:41FromGitter<sealmove> guys, what's the best way to debug right now?
14:12:46FromGitter<alehander92> no hw memory protection
14:13:17FromGitter<sealmove> i remember krux have done some work on debugging cli interface?
14:13:55FromDiscord<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:57Araqwhen you write a kernel, you get to decide the syscall scheme...
14:14:11Yardanicohttps://wiki.osdev.org
14:14:18FromGitter<alehander92> Araq yeah exactly
14:14:20FromGitter<alehander92> what i mean is
14:14:25FromGitter<alehander92> that people love to do linux again
14:14:25Araqlook, libc works on top of an OS, but you're writing an OS...
14:14:29FromGitter<alehander92> whic is great
14:14:38FromGitter<alehander92> yeah, thats my point
14:15:00FromDiscord<bedwardly-down> And much of the os is dependent on libc, right?
14:15:08Yardanicowell indirectly
14:15:47Araqgood, so write some assembler already. seriously
14:16:01FromGitter<alehander92> i am trying to get my nim to compile :D
14:16:12Araqyou don't need muslimC's Linux specific syscall code
14:16:18YardanicoXDD
14:16:25Yardanicojust need to write a macro so we can write safe assembly
14:16:31FromDiscord<bedwardly-down> Bwahahaha
14:16:32FromGitter<alehander92> good idea!
14:16:36FromGitter<alehander92> yardanico my plan was to
14:16:54FromGitter<alehander92> not turn on memory protection and to somehow detect all that stuff on compile time :D
14:16:59FromDiscord<bedwardly-down> And I need to actually learn how to use nim
14:17:12FromGitter<alehander92> when i think about it
14:17:13FromDiscord<bedwardly-down> I just joined here half asleep last night after work
14:17:15FromGitter<alehander92> i can use z3
14:17:22Araqin fact, also don't use the freaking "GNU assembler", get a real one
14:17:24FromGitter<alehander92> to detect that ranges are not entered into
14:17:54FromDiscord<bedwardly-down> What is a real assembler, then?
14:18:07FromGitter<alehander92> but this doesnt seem to make sense now in my head
14:20:25FromDiscord<bedwardly-down> I don't know much about assemblers and have only used the clang and gnu ones
14:20:57Yardanicowhen people have too much time they write forums in assembly
14:20:58FromGitter<alehander92> hm, i dont have stdint.h
14:21:20Yardanico(https://asm32.info/fossil/repo/asmbb/index and https://board.asm32.info/ for live instance)
14:21:49FromDiscord<bedwardly-down> Also, +1 for fossil link. 😄
14:21:56Yardanicobut wait isn't it better than nimforum /s
14:22:02Yardanicoit has TAGS
14:23:11FromDiscord<bedwardly-down> Ummmm.... What?
14:23:18Yardanicoalthough nimforum had merged categories already, just didn't update the live instance
14:23:27FromDiscord<bedwardly-down> Why do that?
14:23:46FromDiscord<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:18FromGitter<alehander92> dude
14:24:19Yardanicowhy not? :D that's how these questions are answerred
14:24:20FromGitter<alehander92> my stdint.h
14:24:27FromGitter<alehander92> includes with include_next stdint.h
14:24:29Yardanicolol
14:24:30FromGitter<alehander92> what does this mean
14:24:41Yardanicoand this forum is actually pretty small and light
14:24:48Yardanicoalthough I wouldn't write in assembly :P
14:25:43FromDiscord<bedwardly-down> Would you do it in Nim?
14:26:05Yardanicoof course, if i had do :P
14:26:09Yardanicoto*
14:26:17FromGitter<alehander92> oh i forgot to pass -ffreestanding
14:27:20FromGitter<alehander92> Yardanico
14:27:32FromGitter<alehander92> nostdlib
14:27:34Yardanicoyes?
14:27:47FromGitter<alehander92> how to nim
14:27:49FromGitter<alehander92> no stdlib
14:27:50FromGitter<alehander92> :D :D D:
14:27:59FromGitter<alehander92> i cant seem to pass it
14:28:04Yardanicouhh
14:28:10FromGitter<alehander92> either with `-d` or the other
14:28:16Yardanico--passC
14:28:20Yardanicoor/and --passL
14:28:23FromGitter<alehander92> but it generates
14:28:30FromGitter<alehander92> include <stdlib.h> in the nim source
14:28:39FromGitter<alehander92> i thought nim itself should not generate it
14:28:45Yardanicoah right
14:28:49YardanicoI just have an empty stdlib.h :DDDDDD
14:28:54Yardanicohttps://github.com/Yardanico/JackOS/blob/master/kernel/stdlib.h
14:29:17Yardanicojust add an empty stdlib.h in your include path
14:29:17FromGitter<alehander92> smart!
14:29:40Yardanicodon't forget -d:nimNoLIbc and -d:noSignalHandler
14:29:43FromDiscord<bedwardly-down> Holy hell!!! The first tutorial compiling and running is kind of satisfying
14:29:55FromGitter<alehander92> oh man i had this
14:29:57FromDiscord<bedwardly-down> The output here is nice
14:30:02FromGitter<alehander92> even with some files!
14:30:11FromGitter<alehander92> some files
14:30:17FromGitter<alehander92> i forgot
14:32:14FromGitter<alehander92> Araq can i pas ld.exe
14:32:30FromGitter<bedwardly-down> Hello
14:33:20FromGitter<bedwardly-down> With my current setup, this is much easier than using Discord for chat here
14:33:48FromGitter<sealmove> Is there a way to simulate "any" type for an object's field?
14:34:04FromGitter<sealmove> I mean for runtime
14:34:23FromGitter<alehander92> variants or generics or ptr/RootObject ref if its ref
14:34:24FromGitter<alehander92> ?
14:35:19*fredrikhr quit (Read error: Connection reset by peer)
14:35:47*fredrikhr joined #nim
14:36:22FromGitter<sealmove> generics don't work in this context
14:37:07FromGitter<sealmove> I want something similar to Java's `Object` type
14:38:07FromGitter<alehander92> but can you have stuff like
14:38:11FromGitter<alehander92> ints and other basic values
14:38:12FromGitter<alehander92> inside?
14:38:16FromGitter<alehander92> brandon hello!
14:39:52FromGitter<bedwardly-down> :hello:
14:39:54FromGitter<sealmove> @alehander92 not sure, probably only need objects.
14:40:15FromGitter<sealmove> yes, only need objects
14:40:37FromGitter<sealmove> actually the correct implementation is object variants...
14:43:07FromGitter<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:37FromGitter<alehander92> Yardanico hm, sorry, i'll look into your impl :D
14:45:40*thomasross joined #nim
14:45:41FromGitter<alehander92> i cant find out why
14:45:49FromGitter<alehander92> nim generates free/calloc/signal
14:46:31FromGitter<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:34FromGitter<bedwardly-down> So, you used it as a scripting language more than anything else, right?
14:48:01FromGitter<alehander92> oh i didnt need!
14:48:09FromGitter<alehander92> i defined them .
14:48:19FromGitter<alehander92> but now my qemu just fails
14:49:16zacharycarterI was going to stream some game dev stuff - but I can't get OBS to display my full terminal window
14:49:18FromGitter<alehander92> ah, ran with wrong arch and without -kernel invalid kernel header
14:49:19zacharycarterso I gave up :/
14:49:24FromGitter<alehander92> oh no zachary
14:49:39FromGitter<alehander92> cant you somehow resize it
14:49:44zacharycarterI have a meeting in 11 minutes - I'll try again after that
14:49:44FromGitter<alehander92> or reset settings
14:49:51FromGitter<alehander92> ok
14:50:17zacharycarterI tried! I set it to 2880 x 1800 and downsampled to like 1280x720 but some was still cut off
14:51:15FromGitter<alehander92> hmm
14:51:21FromGitter<alehander92> no idea
14:51:25FromGitter<alehander92> it just works iirc with mine
14:52:26FromGitter<bedwardly-down> How does nim handle package and file structures?
14:53:19zacharycarterwhat do you mean
14:55:46FromGitter<bedwardly-down> Example: `import hxmath.math.Vec2` is a lib file from the hxmath package in Haxe
14:56:07Yardanicohttps://nim-lang.org/docs/manual.html#modules-import-statement and down
14:56:10Yardanico(and below)
14:56:16FromGitter<bedwardly-down> That reads file structure wise as `hxmath/math/Vec2.hx`
14:56:24Yardanicoin nim you do import a/b/c
14:56:35zacharycarteryeah nim doesn't have packages
14:56:42zacharycarterit's not Java / C# / Haxe
14:56:45FromDiscord<codic> now I can re-ask my question!
14:57:04FromDiscord<codic> For the nimcache directory for my project I have these files:
14:57:04FromDiscord<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:04FromDiscord<codic> but can't file the main flie I should be looking at
14:57:08FromGitter<bedwardly-down> Codic, my fellow Fishy user!!! :D
14:57:10zacharycarteryou put things in modules and then import the modules and Nim handles only importing what is necessary when it compiels to C
14:57:26Yardanico@codic what's your main nim file called?
14:57:32FromGitter<bedwardly-down> Thanks @zacharycarter
14:57:32zacharycarterit's '@mhw.nim.c
14:57:40zacharycarternp
14:57:42Yardanicoif it's hw.nim, then you should look into @mhw.nim.c
14:57:45Yardanico@m is just a prefix
14:57:47FromDiscord<codic> ah ok.
14:57:48FromDiscord<codic> Thanks
14:57:57zacharycarterthe .o files are object files
14:58:06zacharycarterfrom the C/C++ compiler
14:58:14zacharycarteror Obj-C I guess
14:58:21FromGitter<bedwardly-down> I'm not a C/C++ dev, so that's pretty new to me
14:58:23FromDiscord<codic> Aw, I can't use `Ctrl R` to search history
14:58:32FromGitter<bedwardly-down> I kind of skipped them
14:58:40zacharycartergetting comfortable with C/C++ will certainly help you with Nim development
14:59:33zacharycarterbut of course it's not a requirement
14:59:53FromDiscord<codic> Damn, this C seems to require the nimbase header
14:59:53zacharycarteractually Nim helped me become much more comfortable with reading C/C++ - I'm still not practiced enough at writing either
15:00:04zacharycarterand things like move semantics still elude me
15:00:06FromDiscord<codic> > `#include "nimbase.h"`
15:00:18FromDiscord<codic> Yeha, nim is pretty similar to c and all conceptually
15:00:32FromGitter<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:14FromDiscord<Yardanico> Don't use include generally though
15:01:24FromDiscord<Yardanico> Most of the time you want import
15:01:37FromGitter<bedwardly-down> I see that nim has pointers too
15:02:00FromGitter<bedwardly-down> And Inline? That might make this port easier
15:02:11FromGitter<alehander92> Yardanico i managed to start
15:02:11zacharycarterNim has managed and unmanaged pointers
15:02:23zacharycarterand yes it can inline procedures via the `{.inline.}` pragma
15:02:27FromGitter<alehander92> but the console output is just not there
15:02:31FromGitter<alehander92> how do you setup the serial
15:03:00FromDiscord<Yardanico> com.nim
15:03:10FromDiscord<Yardanico> It uses two procs from io.nim
15:03:27FromDiscord<Yardanico> Which are inline assembly
15:05:18FromDiscord<codic> Where can i find the file nimbase.h?
15:06:06FromDiscord<Yardanico> nimdir/lib/nimbase.h
15:06:35FromDiscord<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:36FromDiscord<codic> alright, why is it called danger?
15:07:39FromDiscord<codic> And where's nimdir?
15:08:45FromDiscord<Yardanico> because -d:danger disables a lot of checks
15:08:50FromGitter<kaushalmodi> codic: Protip, navigate to https://github.com/nim-lang/Nim, hit the `t` key and type the file name
15:09:01FromGitter<alehander92> Yardanico !
15:09:03FromDiscord<Yardanico> nimdir is the directory where your nim resides
15:09:04FromGitter<alehander92> good advice
15:09:09FromGitter<kaushalmodi> On Emacs, I use the projectile package to quickly find any file in a repo
15:09:16FromGitter<alehander92> so hmmm
15:09:22FromGitter<alehander92> i have to see why my screen
15:09:40FromDiscord<codic> ah
15:10:11FromDiscord<codic> Wait, but I installed it with `sudo pacman -S nim`
15:10:17FromDiscord<codic> probs /usr/share/nim or somethin
15:10:28FromDiscord<codic> nope that only has `doc`
15:10:42*abm joined #nim
15:10:54FromDiscord<Yardanico> Well search for it
15:11:22*fredrikhr quit (Ping timeout: 256 seconds)
15:11:25FromDiscord<codic> https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/nim
15:11:26FromDiscord<codic> there
15:11:26FromDiscord<codic> Got it
15:14:13zacharycarteris it possible to nest tasks in a nimscript file?
15:14:43zacharycarteror should I just turn one into a procedure?
15:16:43zacharycarterI just turned it into a proc
15:17:36shashlickYou can
15:17:50FromGitter<kaushalmodi> > is it possible to nest tasks in a nimscript file? ⏎ ⏎ Yes
15:18:03shashlicktask abc => abcTask()
15:18:16zacharycarterah thanks
15:18:25FromGitter<kaushalmodi> If I have a task `foo` and I want to call in task `bar`, I called it using `selfExec("foo")`
15:18:54FromGitter<kaushalmodi> shashlick: ⏎ ⏎ > task abc => abcTask ⏎ ⏎ Oh, really? TIL :D [https://gitter.im/nim-lang/Nim?at=5eac3ddea9de3d01b1e0b73e]
15:19:26zacharycarterworks perfectly! thanks guys :D
15:19:42FromGitter<kaushalmodi> heh, so we have at least 2 ways of doing that
15:19:54*joshbaptiste quit (Ping timeout: 265 seconds)
15:20:44FromGitter<kaushalmodi> shashlick: Where is that *abcTask* thing documented?
15:22:15shashlickNo idea, I saw that in the code
15:23:00*joshbaptiste joined #nim
15:23:36FromGitter<kaushalmodi> yep, I just grepped for it ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5eac3ef797338850a2df67df]
15:23:41FromDiscord<clyybber> uh, github is buggy again
15:24:11FromGitter<kaushalmodi> *oops copied code using the wrong binding*
15:24:59shashlick@pigmej - re nimpcre
15:25:11shashlickcan you share the code you are using?
15:26:07disruptekshashlick: do you have a 1.2 branch in your travis wrapper? does choosenim?
15:27:30disruptekAraq: 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:34shashlicki cannot pick the branches, that has to be done in the yml file
15:34:05shashlickchoosenim's yml doesn't have 1.2 since it only builds with 1.0 right now
15:34:21shashlickare you running into issues building choosenim on 1.2?
15:37:55disruptekgithub requires arc, thus nimph requires arc.
15:39:22FromDiscord<clyybber> disruptek: Yeah, we probably should
15:41:44*silvernode joined #nim
15:47:15*Romanson joined #nim
15:48:43Araqdisruptek, no but you can use
15:49:11Araqwhen not defined(nimHasSinkInference): {.pragma nosinks.}
15:49:31FromGitter<alehander92> dom96 what would you want to add to nimkernel?
15:50:06FromGitter<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:03FromGitter<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:23zacharycarterhttps://www.twitch.tv/zachary_carter
16:17:26zacharycarterstream is up
16:19:23zacharycarternevermind need to fix encoder settings
16:19:49disruptekdoh
16:20:51zacharycarterobs was eating like 200% cpu
16:23:28zacharycartercan you hear anything disruptek?
16:23:48disruptekyeah, i'm just too lazy to type. 😁
16:25:07FromDiscord<Rika> Whatcha streamin
16:25:20zacharycartergame development
16:39:09FromGitter<alehander92> okk
16:39:48PrestigeNice, watching
16:40:05FromGitter<alehander92> i am going to stream after eating
16:40:18FromGitter<alehander92> is this vscode or vim
16:40:50Prestigelooks like kak
16:40:56leorize[m]it's kakoune
16:41:08FromGitter<alehander92> oh nice
16:41:53FromGitter<alehander92> hm, tasks do look useful
16:41:55FromGitter<alehander92> i am a bit lazy
16:41:56FromGitter<alehander92> for them
16:42:39*Ven`` quit (Quit: Textual IRC Client: www.textualapp.com)
16:43:42Prestigehavent tried kakoune, anyone have experience vs. vim?
16:45:22Prestigezacharycarter: your mic is a tad quiet
16:46:20FromDiscord<clyybber> I'm using kakoune
16:56:22*ptdel joined #nim
16:56:56FromGitter<alehander92> wow a dog
16:57:20FromGitter<alehander92> wooof woof , well not sure if i agree
16:57:53FromGitter<alehander92> a nice scene :D
17:00:05FromGitter<alehander92> https://www.twitch.tv/alehander42/
17:00:20FromGitter<alehander92> ok i am going to stream a bit about learning osdev
17:00:30disrupteksweet.
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:03Araqalehander92: read your chat
17:26:33dom96alehander42: dunno, maybe play around with implementing more things
17:28:40shashlickAraq: is it fair to say that C identifiers with leading underscores should not be wrapped?
17:31:00shashlickat least types
17:31:03Araqwhy not? C is full of underscores
17:32:52shashlickso its not C's hack for private names
17:39:33Araqno, it's just usual C code
17:40:15*fredrikhr joined #nim
17:45:12*narimiran quit (Remote host closed the connection)
17:45:40shashlickokay cool
17:48:42*narimiran joined #nim
17:52:40*waleee-cl joined #nim
17:55:19FromGitter<alehander92> what does cadey's vm do
17:55:24FromGitter<alehander92> disruptek
17:56:23Cadeywhat did i do now
18:07:05FromGitter<alehander92> well
18:07:12FromGitter<alehander92> somebody told me something about a cadey vm
18:07:29Cadeywho is that someone lol
18:07:34disruptekme
18:07:49FromGitter<alehander92> of course
18:08:19FromGitter<alehander92> basically
18:08:51FromGitter<alehander92> we were talking about something like interpreting nim
18:09:05*Senketsu joined #nim
18:13:34Cadeyi made a VM?
18:13:48Cadeydid i get out of sync with time again
18:16:44FromDiscord<Recruit_main707> `result[0..^2]` this gives me all the string except the last character right?
18:17:25*BohlAdmin joined #nim
18:17:39narimiranthere'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:12FromDiscord<Recruit_main707> !eval echo("abcde"[0..^2])
18:18:14NimBotabcd
18:20:36*BohlAdmin joined #nim
18:23:55*jds_dizzy_ joined #nim
18:23:55*solitudesf- joined #nim
18:24:45jds_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:33FromGitter<alehander92> awesome
18:29:38FromGitter<alehander92> string and seq-s work for me
18:29:41FromGitter<alehander92> Yardanico
18:29:48FromGitter<alehander92> in qemu with gc:arc
18:39:39FromGitter<bedwardly-down> Afternoon, all. You guys still trying to get the toy kernel to build properly?
18:39:57FromDiscord<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:15FromGitter<alehander92> it does for me
19:01:38FromGitter<alehander92> i streamed about it :D https://www.twitch.tv/videos/608175538 but its very chaotic brandon
19:01:47PMunchPhew, spent almost all day setting up my new monitors :S
19:02:30*FromDiscord <Recruit_main707> **light theme**
19:02:53PrestigePMunch: What did you get?
19:03:01FromGitter<alehander92> i love light themes :D
19:03:11FromDiscord<Recruit_main707> being Bytes of type []bytes in go:
19:03:11FromDiscord<Recruit_main707> b.Bytes != nil
19:03:11FromDiscord<Recruit_main707> how would this be done in nim??
19:03:54PMunchPrestige, nothing fancy, just some old monitors I had lying around. But they are a significant upgrade from my 1680x1050 monitors
19:04:01PMunchThese are 1920x1200
19:04:30PMunchBut 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:43PMunchSo 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:53PrestigeNice upgrade. I have another one coming in next week
19:06:50PrestigePMunch: about nimlsp, would you have time to voice chat about it?
19:07:10FromDiscord<Recruit_main707> (just in case someone was gonna answer me, it doesnt matter anymore)
19:07:58FromGitter<alehander92> Recruit
19:08:07FromDiscord<Recruit_main707> ye?
19:08:11FromGitter<alehander92> is bytes a sequence
19:08:27FromDiscord<Recruit_main707> in nim, yes
19:08:50FromGitter<alehander92> zacharycarter sorry for not watching/interrupting :( whats the basic plan for frag in the future
19:08:58FromDiscord<Recruit_main707> but its really not necesary, dont worry :)
19:09:06FromGitter<alehander92> Recruit well whats the logical
19:09:15FromGitter<alehander92> yeah usually there is some sense to check eg empty
19:09:33PMunchPrestige, sure
19:09:39FromGitter<russmack> Anyone had luck getting vim tagbar to work with nim?
19:10:35PrestigePMunch: pm me whenever, I'm free through till Monday
19:11:02PMunchWe can do it right now
19:11:05FromDiscord<Recruit_main707> i wonder... can you pm the gitterirc bot???
19:11:16PMunchJust give me a sec to make sure my mic is working properly
19:11:37Prestigeah in a work call for about 50 more mins then I'm free, sorry
19:11:40FromGitter<alehander92> so
19:11:44FromGitter<alehander92> i want to generate asm
19:11:46FromGitter<alehander92> with a macro
19:11:52FromGitter<alehander92> and output a file as part of my build
19:11:58FromGitter<alehander92> do people do this
19:12:09FromGitter<alehander92> maybe i need to just write a normal program to do it
19:12:16FromGitter<alehander92> both seem good
19:12:27FromDiscord<Recruit_main707> > do people do this
19:12:27FromDiscord<Recruit_main707> only suicidal people probably
19:12:41FromGitter<alehander92> come on man its just a loop with some text :D
19:13:05FromGitter<alehander92> to generate stuff like https://github.com/cfenollosa/os-tutorial/blob/master/18-interrupts/cpu/interrupt.asm#L71
19:13:13FromDiscord<Recruit_main707> its just... what a dangerous sentence when programming :p
19:13:30FromDiscord<Recruit_main707> you should try nevertheless
19:14:03PMunchPrestige, no problem, my mic seems to be totally messed up ATM..
19:14:18PrestigeKk
19:14:35*Jesin joined #nim
19:16:45FromGitter<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:10FromDiscord<Recruit_main707> its starting to become a trend
19:17:40FromDiscord<Recruit_main707> disruptek for instance usually streams while he codes
19:17:49disruptek~stream
19:17:49disbotstream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek
19:18:22FromGitter<bedwardly-down> I haven't see mumble in forever. :O
19:18:27PMunchYeah there are a couple of people who stream from time to time
19:19:13FromGitter<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:23FromGitter<alehander92> wow i found a greatly expressed question about os multitasking on stack overflow
19:22:31FromGitter<alehander92> and who is the author? andrea ferretti
19:22:33FromGitter<alehander92> this man can right
19:22:35FromGitter<alehander92> write*
19:22:41FromGitter<alehander92> obviously i barely write write
19:26:20*jds_dizzy_ quit (Remote host closed the connection)
19:27:08FromGitter<bedwardly-down> I joined disruptek's stream but can't do anything even after following him? O.o
19:27:33FromGitter<alehander92> you can watch!
19:28:02FromGitter<alehander92> do you want to talk on the strem?
19:28:08FromGitter<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:51FromDiscord<Recruit_main707> nested is a keyword in nim??
19:38:16FromDiscord<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:53FromDiscord<Recruit_main707> nvm
19:39:22FromDiscord<Recruit_main707> i didnt know you had to separate `using` args of normal ones with ;
19:41:51FromGitter<alehander92> oooh yeah
19:41:52FromGitter<alehander92> sorry
19:42:12FromGitter<alehander92> you know you can write
19:42:14FromGitter<alehander92> a, b: int
19:42:19FromGitter<alehander92> even if you dont use using?
19:48:02*leorize joined #nim
19:51:13shashlickwth is the intention of this code - https://github.com/lattera/glibc/blob/master/bits/confname.h#L24
19:51:52shashlickwhy an enum val - `_PC_LINK_MAX` and then a #define of the same
19:52:35PMunchPrestige, here's what my new setup looks like: https://uploads.peterme.net/lowered.jpg https://uploads.peterme.net/raised.jpg
19:53:41PrestigeNice! I could really use a third monitor at timeslol
19:54:16leorizeshashlick: welcome to the amazing world of glibc :P
19:54:27leorizealso 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:22PMunchPrestige, I've got two spares now :P
19:55:50shashlickyep, but at least i found a bug in nimterop
19:57:37FromDiscord<Never Listen To Beef> Pmunch living life dangerously with that 3d printer at his feet
19:58:06PMunchHaha, I don't run it under there
19:58:11PMunchI pull it out when it's in use
19:58:14FromDiscord<Never Listen To Beef> I can tell it's a shelf
19:58:20FromDiscord<Never Listen To Beef> Never seen a floor shelf before though
19:58:24PMunchA shelf?
19:58:25FromDiscord<Recruit_main707> have i got it right?
19:58:25FromDiscord<Recruit_main707> https://cdn.discordapp.com/attachments/371759389889003532/705870765244809336/unknown.png
19:58:37FromDiscord<Never Listen To Beef> You have stuff put on the build plate
19:59:08PMunchOh, that's just the cables and filament roller for the printer
19:59:15FromDiscord<Never Listen To Beef> ah
19:59:16PMunchI actually use it fairly often
19:59:26PMunchThe brown thing to the left of my computer is my shelf
19:59:36FromDiscord<Never Listen To Beef> yea i was going to say i
19:59:43FromDiscord<Never Listen To Beef> i'd bolt it to said brown thing
20:00:09FromDiscord<Rika> @Recruit_main707 p.much yeah
20:02:15*MightyJoe quit (Ping timeout: 240 seconds)
20:04:17PMunchThe glory that is the shelf: https://uploads.peterme.net/openshelf.jpg
20:04:30PMunchHow would I bolt it to that?
20:04:41*cyraxjoe joined #nim
20:04:46PMunchAnd why? The whole point is for it to stay hidden while I'm not using it..
20:05:04PMunchRecruit_main707, you're kinda right, but it's a bit oddly worded
20:05:05FromDiscord<Never Listen To Beef> idk im a clutz and would end up kicking that printer
20:05:18PMunchHaha, I don't kick it that often
20:05:33FromDiscord<Never Listen To Beef> But bolting wouldnt be hard roll that out drill a few holes then pass some bolts through
20:07:08PMunchBut where? On the top?
20:07:13FromDiscord<Never Listen To Beef> yea
20:07:37FromDiscord<Never Listen To Beef> Clearly not on the top of the roll out organizer since it doesnt have one 😛
20:10:24PMunchIt's waaay to tall for that
20:10:33PMunchAnd it wouldn't hide it at all :P
20:11:39*MightyJoe joined #nim
20:12:13FromDiscord<Never Listen To Beef> Hiding stuff is for nerds, and we're waaay off nim 😄
20:12:52PMunchBeing 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:44FromDiscord<Rika> f
20:15:57FromDiscord<Rika> "who likes nim anyway smh smh"
20:19:22PMunchRika, 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:03FromDiscord<Rika> "no one wants to talk Nim" can be interpreted as "no one likes Nim" in a way
20:26:52PMunchOh, haha :P
20:27:05PMunchbrb
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:50PMunchDamn it..
20:37:44PMunchAfter my jigging around with the computer I have this horrible base hum in my front mic..
20:37:51*xet7 joined #nim
20:37:54PMunchAnd I don't really know why..
20:38:00PrestigeHmm :/
20:38:08PrestigeThat's annoying
20:38:12PMunchSound card didn't fix it :P
20:38:37PMunchAlthough I didn't do a lot of debugging with it
20:38:49PMunchI discovered that I can connect the front microphone to it
20:39:00PMunchBut it didn't seem to have drivers..
20:40:39FromGitter<bedwardly-down> Rika, that makes sense
20:41:49FromDiscord<Rika> bedwardly-down what
20:42:39*jjido quit (Ping timeout: 272 seconds)
20:48:31stefantalpalaruHave you ever seen this statx.h CPP error when building Nim on Ubuntu 19.10? https://discordapp.com/channels/613988663034118151/616299964242460682/705880182124445697
20:49:17FromGitter<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:49FromGitter<Bennyelg> How can I do something like this: ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=5eac8be57975db7ebfdb7f15]
20:51:50FromGitter<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:47FromDiscord<Recruit_main707> any python users that can confirm me that ~ is just bitwise not and therefore == nim's not?
21:22:19Yardanicoin nim "not", "and" can be used for both booleans and bitwise operations
21:22:32Yardanicoalso << and >> are shl and shr respectively
21:22:45FromDiscord<Recruit_main707> so, yes?
21:23:56FromGitter<enthus1ast> @Bennyelg afaik this is not directly possible; you could consider Object variants or serialize the data
21:27:10zacharycarterstream is back online: https://www.twitch.tv/zachary_carter
21:28:14FromGitter<enthus1ast> what are you building zacharycarter?
21:28:23zacharycarterI'm working on a game engine
21:28:36zacharycarterspecically right now, hot reloading and plugins
21:28:48FromDiscord<treeform> is the game engine in nim?
21:28:51zacharycarteryes
21:29:04FromGitter<enthus1ast> considered entity component system?
21:29:07FromDiscord<Recruit_main707> Pog
21:29:09zacharycarteryeah I'll be doing one
21:30:04FromDiscord<treeform> your microphone has static, like you are driving down the road.
21:30:05FromGitter<enthus1ast> i've build one 2 days ago :)
21:30:41disruptekhe's on mumble if you wanna chat. i'm watching his stream.
21:31:11FromDiscord<treeform> mumble link?
21:31:30Yardanico~stream
21:31:31disbotstream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat)
21:31:31Yardanicosame as always
21:33:17FromDiscord<treeform> I have connected I don't hear anything
21:33:58Yardanicoyou sure?
21:34:06Yardanicomaybe you're deafened (I mean in mumble)
21:35:26*zacharycarter quit (Ping timeout: 260 seconds)
21:38:51FromDiscord<Recruit_main707> `alignsize and size - 1` how does the compiler interpret this:
21:38:51FromDiscord<Recruit_main707> `(alignsize and size) - 1` or `alignsize and (size - 1)`
21:38:51FromDiscord<Recruit_main707> ?
21:39:08Yardanicowhat are the types of alignsize, size?
21:39:21FromDiscord<Recruit_main707> integrers
21:39:46FromDiscord<Recruit_main707> integers*
21:39:52FromGitter<alehander92> yardanico
21:39:57Yardanico?
21:39:58FromGitter<alehander92> btw i think you dont need those changes
21:40:03Yardanicowhy?
21:40:03FromGitter<alehander92> to sources in your kernel
21:40:10Yardanicowhich ones?
21:40:13FromGitter<alehander92> because i managed to build mine without those
21:40:20Yardanico???
21:40:20FromGitter<alehander92> the manual changes to nim sources
21:40:22FromGitter<alehander92> in the readme
21:40:31Yardanicothat doesn't work for me with --os:any --gc:arc
21:40:33Yardanicowithout these changes
21:40:50FromGitter<alehander92> https://github.com/Yardanico/JackOS/#notes
21:40:55Yardanicoyes I understand
21:41:00Yardanicoit doesn't work for me without them on linux
21:41:00FromGitter<alehander92> do you pass all needed options
21:41:04FromGitter<alehander92> but it works for me hm
21:41:18Yardanicosee https://github.com/Yardanico/JackOS/blob/master/nim.cfg
21:41:55FromGitter<alehander92> wow so many
21:41:59FromGitter<alehander92> my approach is different
21:42:04Yardanicowell do you have source? :P
21:42:04FromGitter<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:19Yardanico--exceptions:goto is not needed here btw
21:42:23FromGitter<alehander92> and then just link separately
21:42:23Yardanico--gc:arc defaults to goto anyway
21:42:30FromGitter<alehander92> and it works
21:43:41Yardanicowell I'm really not sure, maybe because jackos fork uses some strings and stuff
21:43:45FromGitter<alehander92> hm i dont use stackTrace and boundChecks
21:43:50FromGitter<alehander92> but i also usd strings and seq
21:44:23Yardanicowhat about $ for ints?
21:44:40Yardanicofor me seqs don't work even without these stackTrace and boundChecks
21:44:43Yardanicoso I request your source :P
21:44:56Yardanicomaybe jackos doesn't initialize something correctly
21:45:14FromGitter<alehander92> okk
21:47:03FromGitter<alehander92> https://github.com/alehander92/lodka
21:47:36*PMunch quit (Quit: leaving)
21:49:02Yardanicoalso btw panicoverride seems to be not included with --os:any
21:49:35Yardanicocan you try creating a seq and appending to it at runtime?
21:50:09FromGitter<alehander92> appending
21:50:09FromGitter<alehander92> ok
21:50:15Yardanicolike
21:50:31Yardanicovar a = @[1, 2, 3]; a.add 3; consoleWriteNl($a[3])
21:51:22Yardanicoand btw you didn't have to patch nim because you added your custom headers :P
21:51:26Yardanicowith stdio and etcv
21:51:28Yardanicoetc*
21:53:21Yardanico./c/nimbase.h:261:10: fatal error: limits.h: No such file or directory hm
21:53:50FromGitter<alehander92> hmm appending works
21:53:58FromGitter<alehander92> but $integer
21:54:04FromGitter<alehander92> depends on __divdi3
21:54:07Yardanicoah yes
21:54:10FromGitter<alehander92> which i implement now but wrongly
21:54:12Yardanicoyou need to link with libgcc
21:54:19Yardanicoit's okay to do that for kernels btw
21:54:29Yardanicohttps://wiki.osdev.org/Libgcc#How_to_link_with_libgcc
21:54:32FromGitter<alehander92> i think its easier to add it in your own libc
21:54:40Yardanicowell it's not really a part of libc
21:54:46Yardanicoit's gcc's own builtins
21:55:31Yardanicodivision of 64-bit integers on 32-bit CPUs uses __divdi3 afaik
21:55:32FromGitter<alehander92> hmm
21:55:38FromGitter<alehander92> but i *can* define it myself
21:55:46FromGitter<alehander92> i wonder if i can define it correctly
21:55:51FromGitter<alehander92> or this doesnt begin to make sense
21:56:42Yardanicoalso did you get an error with limits.h?
21:56:53Yardanicofor some reason I get an error that nim can't find this header
21:56:58YardanicoI'm using build_nim.sh
21:57:11Yardanicoah I see the problem
21:57:15Yardanicoyou have hardcoded paths :P
21:57:45FromGitter<alehander92> oh yes sorry
21:57:46Yardanicoor not hm
21:57:55Yardanicoit fails at nim step
21:57:56FromGitter<alehander92> i have for the ~/opt/cross/..
21:57:57FromGitter<alehander92> stuff
21:57:59Yardanicoah wait no
21:58:05FromGitter<alehander92> i should provide a setting for that
21:58:56FromGitter<alehander92> but i dont have the limits.h problem i think
21:59:52Yardanicoah -nostdinc
21:59:56Yardanicoit works if I don't pass that
22:00:00Yardanicoand I don't think you need to pass that
22:00:49*solitudesf quit (Ping timeout: 264 seconds)
22:02:17Yardanicohmm maybe I should try booting raw kernel without grub too
22:02:19Yardanicoin jackos fork
22:03:10FromGitter<alehander92> no idea if this changes anything
22:05:06*PMunch joined #nim
22:05:26FromGitter<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:45FromDiscord<codic> Can nimpy use httpclient (https://nim-lang.org/docs/httpclient.html) ?
22:13:45FromDiscord<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:58Yardanico@codic why wouldn't it?
22:14:02YardanicoI mean httpclient with nimpy
22:14:45FromDiscord<codic> just wanted to make sure, I was gonna write a `requests` alternative with nimpu
22:14:49FromDiscord<codic> nimpy*
22:14:59disruptekthat's been done.
22:15:00*zacharycarter joined #nim
22:15:03FromDiscord<codic> i know
22:15:04zacharycarterstream's back up
22:15:14FromDiscord<codic> just for fun haha
22:15:55FromDiscord<codic> also a websockets thing is something i wanted
22:16:31FromDiscord<codic> so would one of those work?
22:16:45Yardaniconimpy is not specific to some subset of nim
22:17:02*sentreen joined #nim
22:18:19FromDiscord<codic> yeah but i thought some libraries might not work
22:18:23Yardanicowhy?
22:20:02FromDiscord<codic> same reason why {.exportc.} doesn't translate tables to ruby hashes
22:20:21Yardanicothat doesn't mean it "wouldn't" work
22:20:27Yardanicoyou'll just have to interface between nim and python types
22:20:30Yardanicoyourself
22:21:20FromDiscord<codic> oh?
22:21:29FromDiscord<codic> faster-than-requests doesn't eem to interface
22:22:23FromDiscord<KingDarBoja> Hi Yard
22:22:30FromDiscord<Recruit_main707> when does this error appear?template/generic instantiation of from here
22:23:36Yardanicothat's not the fulle rror
22:23:40Yardanicoshow us the full error first :)
22:24:15FromDiscord<Recruit_main707> template/generic instantiation of `WriteVal` from here
22:24:19Yardanicofull
22:24:25Yardanicothat's not "full" :P
22:24:31FromDiscord<Recruit_main707> then what
22:24:36Yardanicofull stack trace
22:25:31FromDiscord<Recruit_main707>
22:25:31FromDiscord<Recruit_main707> https://cdn.discordapp.com/attachments/371759389889003532/705907783106822174/unknown.png
22:25:42Yardanicouhh that's not the one
22:25:45YardanicoI meant from the compiler itself
22:25:50*drewr joined #nim
22:25:57Yardanicoin terminal
22:27:10FromDiscord<Recruit_main707> https://play.nim-lang.org/#ix=2ko9
22:27:10FromDiscord<Recruit_main707> full error of running check?
22:27:20Yardanico"Error: expression 'littleEndian64' cannot be called" is the error itself
22:27:30Yardanicoand instantiations just show how the code path ended here
22:27:56Yardanicoalso 'Error: undeclared identifier: 'littleEndian64'"
22:28:07Yardanicodid you forget to import endians?
22:28:15FromDiscord<Recruit_main707> but littleEndian is part of the stdlib isnt it?
22:28:17Yardanicono?
22:28:20Yardanicoit's in "endians" module
22:28:23Yardanicoit's not in system
22:28:56Yardanicoalso 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:00Yardanicoor "export endians"
22:29:19FromDiscord<Recruit_main707> this thing always confuses me
22:29:19FromDiscord<Recruit_main707> https://cdn.discordapp.com/attachments/371759389889003532/705908737650589816/unknown.png
22:29:33Yardanicowhy?
22:30:10FromDiscord<Recruit_main707> why would standar library appear there
22:30:12*liblq-dev quit (Ping timeout: 258 seconds)
22:30:14Yardanico??????????????
22:30:30Yardanicoit's a link to https://nim-lang.org/docs/lib.html
22:30:42FromDiscord<Recruit_main707> i know, when i see it i just thing that module is part of it
22:30:45Yardanicoendians is a part of stdlib but stdlib modules are not magically imported
22:30:51Yardanicoexcept system
22:30:53Yardanicoand threads
22:30:53zacharycarterback again
22:31:28FromDiscord<Recruit_main707> ok, thanks and sorry for the dumb questions :)
22:32:30*MyMind quit (Quit: WeeChat 2.8)
22:38:17FromDiscord<KingDarBoja> RIP IRC
22:38:36Yardanico?
22:38:43FromDiscord<Recruit_main707> bruh moment
22:38:58Yardanico@alehander92 seems like I managed to make JackOS work with seqs too :D
22:39:05Yardanicobasically I used your build_nim.sh instead of a make file lmao
22:41:54FromGitter<alehander92> love it!
22:42:00FromGitter<alehander92> i am trying to make jack os
22:42:04FromGitter<alehander92> run with the makefile!
22:43:49Yardanicoalthough 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:08FromGitter<alehander92> ok
22:50:15FromGitter<alehander92> it builds with makefile now
22:50:33FromGitter<alehander92> but it just shows me blue screen
22:50:41Yardanicoye that's expected with current commits
22:50:55Yardaniconow with some config changes i can do seqs stuff somehow
22:51:18FromDiscord<Rika> how much of a performance hit is accessing heap instead of stack? (ref object vs object)?
22:51:30FromGitter<alehander92> Yardanico ok
22:51:33FromGitter<alehander92> so basically fix
22:51:36FromGitter<alehander92> OBJECT_FILES
22:51:41FromGitter<alehander92> because they are hardcoded currently
22:51:46Yardanicoyeah I know
22:51:51FromGitter<alehander92> i think one can automatically get them from the *.o names
22:51:52YardanicoI'll probably try to use nimscript though :P
22:51:57FromGitter<alehander92> but i am not so good at makefiles
22:52:02FromGitter<alehander92> but makefiles do seem useful i admit
22:52:12FromGitter<alehander92> but otherwise thanks !!!
22:52:17FromGitter<alehander92> i now know of more options
22:52:20FromGitter<alehander92> and linkerexe
22:52:31FromGitter<alehander92> and can adapt this for my kernel
22:52:49FromGitter<alehander92> we can like join forces or something
22:53:10YardanicoI don't know osdev :P
22:53:16FromGitter<alehander92> but you can also do your own thing my ideas are very unreliable
22:53:58FromGitter<alehander92> yeah i plan on basically following some tutorials and doing unexpected stuff
22:54:47Yardanicoalso btw for stacktraces in your kernel there is some issue (maybe because of some problem with malloc and friends)
22:54:56Yardanicothey produce some garbled output instead of proper ones
22:55:32FromDiscord<Rika> T_T
22:57:03FromGitter<alehander92> oh yeah i dont care for those yet
22:57:14FromGitter<alehander92> my c stubs are very very basic
22:57:19FromGitter<alehander92> many of them just to make it build
22:57:53FromGitter<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:00FromGitter<alehander92> but i want to depend on a minimal amount of stuff
22:58:02Yardanicowrite it in nim :P
22:59:02FromDiscord<bedwardly-down> Streaming with Wayland took forever to get working but i did my first nim test stream a little while ago. ☺️
22:59:22Yardanicowell with sway you just install wlrobs
22:59:28Yardanicoadd it to your obs plugins and then use scpy
23:01:53FromDiscord<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:21FromDiscord<bedwardly-down> The main tutorial doc for it misdirected so much
23:03:51Yardanicowhy?
23:03:54YardanicoI followed it too
23:04:08Yardanicoin the readme it literally tells how to install it https://hg.sr.ht/~scoopta/wlrobs
23:04:17Yardanico"Building" and "Installing"
23:06:15FromDiscord<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:45FromDiscord<bedwardly-down> And that was the setup linked from Obs’s help docs
23:08:23FromDiscord<bedwardly-down> https://feaneron.com/2019/11/21/screencasting-with-obs-studio-on-wayland/
23:08:30Yardanicowell i didn't use that
23:09:32FromDiscord<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:00dom96le sigh #11912
23:10:00disbothttps://github.com/nim-lang/Nim/issues/11912 -- 3Add undiscardable pragma and forbid Futures from being discarded
23:10:49shashlickany ideas - https://github.com/genotrance/nimpcre/issues/3
23:10:52disboterror: no matching function for call to 'pcre_free_study' ; snippet at 12https://play.nim-lang.org/#ix=2kox
23:11:39FromDiscord<bedwardly-down> dom96, :/
23:14:00FromDiscord<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:10FromDiscord<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:40dom96async await and futures? I guess
23:15:24FromDiscord<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:18FromDiscord<codic> nim rules.
23:19:20FromDiscord<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:34FromDiscord<codic> and then you be like 'why was my code slow before nim'
23:19:49FromDiscord<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:20FromDiscord<codic> waaaaaaaait https://nim-lang.org/ says string interpolation is evaluated at compile time
23:20:37FromDiscord<codic> But what if you have string interpoltion having a value from input?
23:20:44FromDiscord<codic> *polation
23:20:47FromDiscord<codic> *interpolation
23:20:53FromDiscord<codic> how can that be at compile time?
23:21:47Yardanicostrformat
23:21:53FromDiscord<Rika> @exelotl you arent xd thanks
23:22:05Yardanico@codic well basically your format string is transformed into .add calls
23:22:08FromDiscord<Rika> though i think i'm prematurely optmizing at this point
23:22:09Yardanicoat compile-time
23:22:11Yardanicoand stuff like that
23:23:14Yardanicoso I guess 64kb for the kernel with --gc:arc --os:any is ok :P (after stripping)
23:24:21Yardanicohttps://i.imgur.com/GVi1nYI.png a REAL sequence
23:25:10FromDiscord<Rika> what is that 👀
23:25:12FromDiscord<codic> > @codic well basically your format string is transformed into .add calls
23:25:16FromDiscord<codic> Ohh that makes much more sense
23:25:26YardanicoJackOS (fork of nimkernel)
23:25:29FromDiscord<codic> I thought {variable} was replaced by the content of the variable hahaha
23:25:37Yardanicoand I kinda made it work with --os:any --gc:arc
23:26:23Yardanicohttps://i.imgur.com/olB6Vpa.png
23:26:28Yardanicowait let me try something really crazy
23:26:39FromDiscord<KingDarBoja> I have a question, it is possible to get the list of properties of one type?
23:33:10Yardanicolmao
23:33:16Yardanicotables in kernel
23:33:42FromDiscord<codic> Does nim run on nim raspberry pi?
23:33:45FromDiscord<codic> Does nim run on raspberry pi?
23:33:49Yardanicoyes of course
23:33:54FromDiscord<codic> oh, great
23:34:02FromDiscord<codic> what about the arduino
23:34:20FromDiscord<bedwardly-down> Yar, is that a boot screen?
23:34:20FromDiscord<bedwardly-down> Nice
23:35:55FromDiscord<codic> And how do I install nim on the pi?
23:35:55FromDiscord<codic> (And one last question 😢😢😢 does nim have bindings for the pi camera or would I have to write my own)
23:36:41FromDiscord<codic> or as a third option for the last question osproc.execProcess and raspistill/raspivid would work for *basic* operations
23:38:04FromDiscord<Recruit_main707> > what about the arduino
23:38:04FromDiscord<Recruit_main707> Yep
23:38:36FromDiscord<Recruit_main707> Yardanico: so they work??
23:38:42Yardanicowho?
23:38:43FromDiscord<KingDarBoja> Can I request a suggestion from you, Yardanicco?
23:38:45Yardanicotables? ofc
23:39:25FromDiscord<Recruit_main707> lmao, can you just do echo() ?
23:39:40Yardanicowell if you declare it in your file - ofc
23:39:47Yardanicoit'll shadow the system's own echo
23:39:50Yardanicomaybe
23:39:57FromDiscord<codic> oh nice
23:39:57FromDiscord<codic> i'll just use osproc for the picamera. tryna get choosenim on the pi rn
23:40:15FromDiscord<codic> since the nim downloads page only shows x86/x86_64bit downloads
23:40:38FromDiscord<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:47FromDiscord<Recruit_main707> Isn’t raspberry 64 bit?
23:41:28FromDiscord<codic> yeah but arm64
23:41:43FromDiscord<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:47Yardanico@codic well you can compile from source
23:41:52Yardanicoor use binary releases
23:42:10Yardanicohttps://github.com/nim-lang/nightlies/releases/tag/2020-04-28-version-1-2-dc3919b
23:42:13FromDiscord<Recruit_main707> > yeah but arm64
23:42:13FromDiscord<Recruit_main707> So is my pc
23:42:15Yardanicolinux_arm64
23:42:21Yardanico@Recruit arm64 != amd64
23:42:30Yardanicowell you might be running an arm64 pc, sure, but that's kinda uncommon
23:42:45FromDiscord<Recruit_main707> Probably amd now that you say it
23:42:48FromDiscord<codic> choosenim won't work?
23:42:51Yardanicoit would
23:42:59Yardanicobut it'll compile from source
23:43:04FromDiscord<codic> fine with me
23:43:37FromDiscord<KingDarBoja> Is there a way to get each ast kind and create a key-value pair like I described?
23:43:57FromDiscord<KingDarBoja> I mean, set the type as the key and the properties as the value (a sequence I think)
23:44:25Yardanicoit might work with typedesc , not sure :P
23:45:19FromDiscord<KingDarBoja> I only see name on typedesc
23:45:57*tane quit (Quit: Leaving)
23:47:10FromDiscord<KingDarBoja> Ah well, I will go the easy way and make them manually on a table lol
23:48:52FromGitter<alehander92> Yardanico niccce!
23:50:57*gangstacat quit (Ping timeout: 265 seconds)
23:51:21FromGitter<alehander92> dom96 disruptek i agree about the asyncCheck vs discard thing
23:51:38FromGitter<alehander92> that whole "you should read the docs" if the compiler can detect something doesnt make sense, it should just do it
23:51:48FromGitter<alehander92> too much overthinking imho
23:51:52FromGitter<alehander92> i agree with dom96 &
23:51:54FromGitter<alehander92> *
23:52:04FromGitter<alehander92> sorry, wanted to append to the first message
23:54:05*gangstacat joined #nim
23:55:50*fredrikhr quit (Ping timeout: 260 seconds)