<< 13-11-2020 >>

00:00:34*krux02 quit (Remote host closed the connection)
00:09:00planetis[m]Is there a difference in memory between const seq and const array?
00:15:33FromDiscord<nikki> !eval const s = @[1, 2, 3]; const a = [1, 2, 3]; echo sizeof(s), ", ", sizeof(a)
00:15:36NimBot8, 24
00:16:24FromDiscord<nikki> looks like their layout is different -- `s` itself still has a constant object size and probably has the data pointer + len pair
00:17:41FromDiscord<nikki> makes sense; otherwise you couldn't pass a const seq to some proc that reads seqs and have that proc's impl be same across runtime-init'd or const ones
00:18:06voltistIs it possible to make nimble copy any file to ~/.nimble/bin upon install as well as compiled binaries?
00:19:20planetis[m]nikki: so are const seq's data stored on the heap?
00:20:48*tiorock joined #nim
00:20:48*tiorock quit (Changing host)
00:20:48*tiorock joined #nim
00:20:48*rockcavera quit (Killed (moon.freenode.net (Nickname regained by services)))
00:20:48*tiorock is now known as rockcavera
00:24:02FromDiscord<nikki> planetis: not necessarily. it could be in static data and the ptr is to there, and it's marked as not on the heap somehow so that the system doesn't try to heap-deallocate it when it normally would a normal seq
00:24:12FromDiscord<nikki> strings have that behavior, not sure about seqs, but it's possible
00:24:22FromDiscord<nikki> i'd look at the generated C to make sure
00:25:02planetis[m]nikki: thank you for your explanation
00:26:57FromDiscord<nikki> planetis: https://play.nim-lang.org/#ix=2DXi is there among the C output -- so yeah the data is in the static section of the binary in the C backend. it's totally possible for some code to end up doing a copy of the seq to heap memory at any point, but the const seq itself doesn't cause that
00:27:25FromDiscord<nikki> it uses the same flag to annotate this as for strings (`NIM_STRLIT_FLAG`)
00:28:03FromDiscord<nikki> attempting to write to this data and violate the constness would cause a segfault in this case, bc. OSes often put this memory in a different page
00:31:32planetis[m]yeah im aware, now to figure out why this [enum]( https://github.com/halonium/halonium/blob/master/src/haloniumpkg/commands.nim#L6) cant be the index of an array. Error is Command isnot an ordinal type, how can this be?
00:31:49planetis[m]manual says enums are ordinal types...
00:32:51FromDiscord<nikki> are you referring to some specific part of that file?
00:32:54planetis[m]Nah nvm it wouldnt work out anyway
00:33:19planetis[m]Just that enum
00:34:34planetis[m]Im glad i managed to port it to packedjson https://github.com/halonium/halonium/pull/3
00:34:35disbot[WIP] packedjson port
00:36:20planetis[m]It wasnt easy 😃
00:37:12FromDiscord<nikki> haha nice 😄
00:37:34FromDiscord<nikki> i'm about to get to some json stuff in what i'm working on. i was gonna start with stdlib json and then see if it's a bottleneck in some way
00:38:10FromDiscord<nikki> packedjson doesn't have a `to` macro right / can the stdlib `to` macro just be used with it? does it support `Option[T]` mapping to optional stuff in the json
00:39:30planetis[m]I ported it but havent tested yet
00:40:48planetis[m]OptionT is missing but same as stdlib json
00:41:59planetis[m]once i add some tests will make a pr
00:44:18planetis[m]But regardless of how few commits packedjson had, its a solid library
00:55:47*bung joined #nim
01:04:29*lritter quit (Ping timeout: 265 seconds)
01:05:09*lritter joined #nim
01:13:56*Tanger joined #nim
01:29:22*abm quit (Read error: Connection reset by peer)
01:54:26*xet7 quit (Remote host closed the connection)
01:55:19*gangstacat quit (Quit: Ĝis!)
01:55:54*xet7 joined #nim
02:04:30*gangstacat joined #nim
02:05:06FromDiscord<nikki> planetis: "optiont is missing but same as stdlib" --> how is that same? stdlib supports optiont in json
02:05:48ForumUpdaterBotNew thread by Elcritch: Nim based Firmware -- it's tiny!, see https://forum.nim-lang.org/t/7083
02:15:40FromDiscord<brainproxy> sent a code paste, see https://play.nim-lang.org/#ix=2DY4
02:16:17FromDiscord<brainproxy> never seen that prior to today, so I'm fairly certain it's in some way related to the Xcode update which updated e.g. `clang`, `ld`, etc.'
02:16:21FromDiscord<brainproxy> (edit) "etc.'" => "etc."
02:17:01voltistAny ideas why I might be getting the error `Error: unhandled exception: /usr/lib/nim/pure/xmltree.nim(186, 10) `n.k in {xnText, xnComment, xnCData, xnEntity}` [AssertionDefect]` when trying to get the text of an XML element generated by htmlparser?
02:17:07*apahl quit (Ping timeout: 260 seconds)
02:19:09*apahl joined #nim
02:20:14voltistNevermind, got it. It's `innerText`
02:28:25disrupteki wasn't too impressed with packedjson. i might fork it but more likely i will start from scratch and see how far i get.
02:45:36*Prestige quit (Quit: Prestige)
02:50:26*Prestige joined #nim
02:51:06FromDiscord<shashlick> @disruptek oh that dependency issue? I'm too lazy to understand that algo let alone fix it, too lazy in general for anything though
02:51:23FromDiscord<shashlick> Even that nimterop dll copying issue is half done
03:22:27*apahl quit (Ping timeout: 260 seconds)
03:22:55*apahl joined #nim
03:35:51*thomasross joined #nim
03:56:26*muffindrake quit (Ping timeout: 264 seconds)
03:58:21*muffindrake joined #nim
04:06:02*supakeen quit (Quit: WeeChat 2.9)
04:06:34*supakeen joined #nim
04:18:34voltistGee, I think it will be a long time before I make a tool as niche as I did today
04:18:40voltist!repo dizzyliam/novakkad
04:18:41disbothttps://github.com/dizzyliam/novakkad -- 9novakkad: 11A command line utility for the automatic digitization of typewritten text 15 0⭐ 0🍴
04:44:27FromDiscord<Daniel> i liked the story behind the name
04:56:23*a_chou joined #nim
04:57:45*thomasross quit (Ping timeout: 240 seconds)
04:58:15*a_chou quit (Remote host closed the connection)
05:03:36*Tlangir joined #nim
05:04:32*lritter quit (Ping timeout: 260 seconds)
05:04:55*lritter joined #nim
05:06:07*Tanger quit (Ping timeout: 260 seconds)
06:07:30disruptekshashlick: hey man, it happens. don't sweat it. 😉
06:32:48*solitudesf joined #nim
06:35:31*mmohammadi9812 quit (Quit: Quit)
06:36:44*narimiran joined #nim
06:54:19*habamax joined #nim
06:54:43*waleee-cl quit (Quit: Connection closed for inactivity)
06:59:45*bung quit (Quit: Lost terminal)
07:02:28*Tanger joined #nim
07:04:26*Tlangir quit (Quit: dead)
07:52:38ForumUpdaterBotNew thread by JPLRouge: Help ZMQ , see https://forum.nim-lang.org/t/7085
07:58:41*PMunch joined #nim
08:25:57*Tanger quit (Quit: Leaving)
08:29:14*D_ quit (Quit: No Ping reply in 180 seconds.)
08:29:26*D_ joined #nim
08:31:12ZevvPMunch: that icon was supposed to be a stupid joke
08:31:23PMunchI know :P
08:31:40Zevvpfew :)
08:31:41PMunchBut I've been trying to make the same stupid joke icon myself, and yours look much better :P
08:31:48Zevvhaha
08:31:48FromDiscord<Rebel> Is there a convenient way to generate cryptographically secure pseudo-random bytes in Nim was just going to use random but not sure if that is cryptographically secure. Also does anyone know if nimcrypto algos are FIPS compliant? Mostly AES, sha3 sha2, aes-cbc.
08:32:09Zevvportable, no I don't think so
08:33:20PMunchZevv, my version: https://uploads.peterme.net/2020-11-13-093247_80x113_scrot.png
08:33:20Zevvrandom is just a PRNG
08:33:43ZevvPMunch: aaah right, I see what you mean :)
08:33:58ZevvI do like yours more by the way
08:34:07Zevvit's even more stupid-jokish
08:35:14PMunchI like your shower head better though
08:35:19PMunchMight keep my droplets
08:35:41Zevvteam effort
08:36:34PMunchThat's what open-source is all about isn't it? :)
08:37:15Zevvright
08:37:22*hnOsmium0001 quit (Quit: Connection closed for inactivity)
08:49:58FromDiscord<ElegantBeef> Clearly this is peak icon https://media.discordapp.net/attachments/371759389889003532/776730564018831360/unknown.png
08:50:17FromDiscord<ElegantBeef> ~~Please get the joke~~
08:50:34PMunchHmm
08:51:29PMunchNo (ti) fi[sh]ower
08:51:32PMunchI get it
08:51:33Zevvno-fish-shower. Where does the 'ti-fi' go
08:51:40Zevv'ti'
08:52:20FromDiscord<ElegantBeef> not fish shower
08:52:30Zevvdude
08:53:14FromDiscord<ElegantBeef> It's what i originally read
08:53:36FromDiscord<ElegantBeef> I know it reuses the `sh` but it's what i first read when pmunch linked his 😄
08:54:08FromDiscord<ElegantBeef> Cant tell if the "dude" is disproving or annoyed
08:54:14ZevvPMunch: about your grammars: you should try to ditch any "!" and "&" - you should usually not need those
08:54:25FromDiscord<ElegantBeef> Ah it was both 😄
08:54:40PMunchMine?
08:54:54PMunchOh right, you tagged me :P
08:55:02PMunchI think I'm more tired than I realised today..
08:55:31FromDiscord<ElegantBeef> It's ok i forgive you aslong as you can forgive my joke logo
08:56:33Zevvall that streaming wears you out man
08:57:03PMunchI mean I feel completely fine :P
08:57:36*NimBot joined #nim
08:58:04supakeenjeg vil vaere laksebonder?
08:58:05supakeenno?
08:58:25PMunchHaha
08:58:27FromDiscord<ElegantBeef> What'd you say about my mother?
08:58:34PMunchWhere did you pick up that sentence=
08:58:44PMunch(It means I want to be a salmon farmer)
08:58:51Zevvdon't we all
08:58:55supakeenHaha, we used to have a Norwegian intern at work and she'd read Norwegian newspapers and I'd just read them aloud over her shoulder and she'd correct me.
08:58:56FromDiscord<ElegantBeef> Isnt that all norway is known for
08:59:00FromDiscord<ElegantBeef> Nowadays anyway
08:59:06supakeenAlso we memed that everyone loves salmon in Norway.
08:59:08FromDiscord<ElegantBeef> Taking salmon and fermenting it so you can die
08:59:27PMunchI mean we are one of the biggest exporters of Salmon in the world
08:59:48ZevvNo norway is known for this massive national fund, worth $200k per norwegian
09:00:06PMunchI think it's something like every person in Norway can eat salmon for 8 dinners a day with our current production :P
09:00:10Zevvwith that kind of money, *all* norwegians can just buy their own salmonfarm
09:00:24FromDiscord<ElegantBeef> Fuck i could eat salmon for all 8 meals of a day
09:00:44PMunchMy brother actually is the closest thing to what you'd probably call a salmon farmer
09:01:07ZevvI have family in Ireland. They don't eat salmon because it was their poor-mans food in childhood, and they needed to eat salmon each and every day
09:02:18PMunchHere it was mostly white fish and potatoes
09:02:42PMunchMy mom still thinks of reindeer as student food though, it used to be super cheap when she studied so they would eat it all the time :P
09:03:00FromDiscord<ElegantBeef> Poor mans food, the fuck
09:03:17supakeenPMunch: Same as my parents and horse meat.
09:03:23supakeenIt used to be the cheap meat.
09:03:47PMunchIt's weird how these things fluctuate. Oysters and snails used to be peasant food
09:03:48FromDiscord<ElegantBeef> I live in mainland Canada, seafood is always frozen and expensive
09:03:49PMunchAnd lobster
09:03:50Zevvit still is. my neighbour still wonders what happened to his horse tho
09:04:03PMunchHaha :p
09:29:09planetis[m]disruptek: why what's wrong with it?
09:42:22*cow-orker quit (Remote host closed the connection)
09:56:54*mal`` quit (Quit: Leaving)
09:57:43*mal`` joined #nim
10:03:38*natrys joined #nim
10:13:43*natrys quit (Quit: natrys)
10:53:22Oddmongerfor defining a tuple, must i use a type, or can it be faster like « var a = tuple[x,y:string] » ?
10:53:35Oddmonger(of course i've tried the second form)
10:53:49Araqvar a = ("a", "b")
10:54:13Oddmongerah like this, thank you
11:15:06ForumUpdaterBotNew thread by Jseb: Best way to store key definition for a game, see https://forum.nim-lang.org/t/7086
11:16:10*tane joined #nim
11:58:49*qwertfisch quit (Ping timeout: 272 seconds)
11:59:27*qwertfisch joined #nim
12:06:02*supakeen quit (Quit: WeeChat 2.9)
12:06:36*supakeen joined #nim
12:18:53FromDiscord<VideoCarp> is Nim’s performance, not compilation speed, close to that of unoptimized C?
12:20:34PMunchNo
12:20:40PMunchIt's close to fairly optimised C
12:22:21Araqsince we got .noalias we know of no case where you can write faster C code than Nim code
12:22:41Araqthere is a subset of Nim that maps 1 to 1 to C
12:23:08Araqif you don't stay in this subset, it's sometimes faster than C, sometimes slower
12:27:26*neceve joined #nim
12:29:25FromDiscord<VideoCarp> my case isn’t too sensitive for performance.↵well that’s a lot better performance than I expected it to actually have.
12:35:25*D_ quit (Ping timeout: 240 seconds)
12:35:43*D_ joined #nim
12:54:38FromDiscord<Shucks> Is nim-gdb gone in 1.4.0?
12:55:14FromDiscord<Shucks> nvm. It's in tools
13:04:00*qwertfisch quit (Quit: ZNC - http://znc.in)
13:31:21*thomasross joined #nim
14:20:16*Vladar joined #nim
14:28:12*solitudesf- joined #nim
14:30:16*qwertfisch joined #nim
14:30:34*solitudesf quit (Ping timeout: 256 seconds)
14:39:42*abm joined #nim
14:44:37*tommo joined #nim
14:45:49*waleee-cl joined #nim
14:45:54FromDiscord<shadow.> im getting an `undeclared identifier: 'spawn'` error
14:46:04FromDiscord<shadow.> ive included asyncdispatch which does have this right?
14:46:17FromDiscord<shadow.> (edit) "included" => "impored"
14:46:18PMunchIsn't spawn from threadpool?
14:46:20FromDiscord<shadow.> (edit) "impored" => "imported"
14:46:27FromDiscord<shadow.> lemme check
14:46:38PMunchDefinitely not in asyncdispatch
14:46:38FromDiscord<shadow.> hmm
14:46:40FromDiscord<shadow.> it might be shoot lol
14:46:59FromDiscord<shadow.> yup you're right ty
14:47:37*solitudesf- is now known as solitudesf
14:52:26*tommo quit (Remote host closed the connection)
14:57:15FromDiscord<notchris> i was trying that Neel pkg the other day
14:57:18FromDiscord<notchris> and has problems with async
14:57:26FromDiscord<notchris> (edit) "has" => "had"
15:40:10FromDiscord<shadow.> rip
15:43:35FromGitter<Kvothe87> hi, a couple of i believe silly questions. In jester how should i properly respond with a file? I want to send the basic html starting page. I did it ( https://play.nim-lang.org/#ix=2E1p) with a trick in the example below, but i'm certain it is not the right way. The second question is how should i send a file for dowload?
16:05:13FromDiscord<shadow.> do you need html templating support?
16:05:30FromDiscord<shadow.> hmm
16:05:45FromDiscord<shadow.> i mean technically html is just text so you can just return text of the file lmao
16:05:52FromDiscord<shadow.> im sure there's a better way tho lemme check
16:07:26FromDiscord<shadow.> i mean yeah you can just do `resp readFile("Main.html")` if you don't need templating
16:09:52FromDiscord<Lomomn> Is there a performance difference between modifying arrays vs sequences?
16:10:01FromDiscord<lqdev> no
16:10:07FromDiscord<Lomomn> thanks
16:12:46disruptekplanetis[m]: remind me what we're talking about.
16:13:37planetis[m]about packedjson, you mentioned you'd like to redo it/
16:14:00disruptekplanetis[m]: packedjson? it works fine for what it does, but it's not suitable as a jason serialization impl.
16:14:09disrupteker, /de/-serialization.
16:15:00planetis[m]who's jason?
16:15:19disruptek!repo jason
16:15:20disbothttps://github.com/disruptek/jason -- 9jason: 11JSON done right 🤦 15 31⭐ 1🍴
16:16:33planetis[m]nice
16:18:56FromGitter<Kvothe87> @shadow thank you. i did sendFile(main.html). and it also works, don't know what is the difference.
16:18:57disruptekit's not where it should be, but i'll finish it once concepts are fixed.
16:19:14disruptekand obviously, it's production-ready now.
16:20:19planetis[m]so a JsonNode is just a string?
16:20:34disruptekin jason, Json is a distinct string, yes.
16:22:30planetis[m]oh well, my halonium prs were rejected...
16:23:13planetis[m]the maintainer doesn't find packedjson all that useful for that usecase
16:24:44disrupteklink
16:24:47planetis[m]context: https://github.com/halonium/halonium/pull/3
16:24:48disbotpackedjson port
16:25:46disrupteki agree that it's probably the wrong place to use packedjson.
16:27:38planetis[m]yeah i cant refute that
16:28:45disruptekpurely because if json is going to be exposed, it should have the stdlib interface unless there is a performance concern.
16:29:00disruptekbut i hope more people will use packedjson going forward.
16:30:09planetis[m]at least there were problems found and fixed
16:30:35planetis[m]for both projects, just need to create a seperate pr for halonium
16:31:00disruptekyeah, packedjson obviously doesn't get a lot of attention because araq is focused on the compiler. it's a good pr.
16:31:08disruptekit was merged, wasn't it?
16:33:06planetis[m]yes
16:35:55disruptek👍
16:49:32PMunchHmm, apparently creating a constraint that expresses "these two rectangles should not overlap" is surprisingly difficult..
16:59:42*rockcavera quit (Remote host closed the connection)
17:04:14*hnOsmium0001 joined #nim
17:25:58disruptekwhen two rectangles really love each other...
17:30:14Zevvwhy or how is it difficult?
17:30:24Zevvit's just comparing points?
17:31:39FromGitter<timotheecour> ya, it’s just 4 comparisons
17:35:54FromDiscord<lqdev> sent a code paste, see https://play.nim-lang.org/#ix=19Ip
17:36:53FromDiscord<lqdev> what's so hard about just doing `not intersects(a, b)`
17:38:55disruptekflatlanders don't understand.
17:41:05planetis[m]dom96: can you review https://github.com/nim-lang/Nim/pull/15919 ?
17:41:06disbotHttpclient improvements
17:43:53PMunchProblem is to define it as a constraint for Kiwi
17:44:50PMunchI had an idea for layouting windows that resolved around defining the x, y, w, h of windows, along with the screen resolution, and then just putting constraints on them and let a solver do the layout
17:45:15Zevvit does not do boolean logic, right?
17:45:27PMunchYeah, no logic
17:45:34Zevvit's easy to express a point lies within a rect, but hard to say it *doesn't*
17:45:35PMunchBasically it's just solving a bunch of equations
17:46:01ZevvUse Z3 instead :)
17:46:07PMunchAnd it doesn't have stuff like abs
17:47:10PMunchHmm, that looks promising
17:47:18ZevvWhat does?
17:47:20ZevvZ3?
17:47:21Zevvdon't go there
17:47:52ZevvI will laugh at you if you make a window manager layouter based on Z3
17:48:23ZevvHm with kiwi, basically there is logic, but only `and`
17:48:35Zevvbecause you have more then one constraint
17:49:52*tane quit (Quit: Leaving)
17:53:50PMunchWell yeah
17:54:17PMunchSo I need to express it as a set of rules that all have to be true..
17:54:39PMunchAnd only basic math
17:54:52FromDiscord<shadow.> im getting an `Error: expression 'read(file, buffer)' has no type (or is ambiguous)` error when reading into an array of 1000 bytes from a stream
17:54:57disruptekall math is basic.
17:55:03FromDiscord<shadow.> am i using the proc incorrectly?
17:55:08ZevvSo then there is no way to express a point should not lie in a rect.
17:55:08disruptekyes.
17:55:50disruptekZevv: think i should abandon the magic header frosty adds?
17:55:53FromDiscord<shadow.> how can i use it correctly lol?
17:55:59Zevvdisruptek: what's in the magic header?
17:56:07disruptekjust a magic value.
17:56:24Zevvso who cares about that?
17:56:35Zevveither you make it fully typed and checked
17:56:39Zevvor you just don't care at all
17:57:00disruptekthat's my thinking, too.
17:57:19PMunchUgh, I guess it's back to the drawing board for my algorithm then..
17:57:43*casaca quit (Remote host closed the connection)
17:57:48FromDiscord<shadow.> sent a code paste, see https://play.nim-lang.org/#ix=19Zj
17:58:05FromDiscord<shadow.> im getting the aforementioned `Error: expression 'read(file, buffer)' has no type (or is ambiguous)` error
17:59:27*PMunch quit (Quit: leaving)
17:59:37FromDiscord<brainproxy> sent a code paste, see https://play.nim-lang.org/#ix=1akz
18:00:33FromDiscord<brainproxy> (edit) "https://play.nim-lang.org/#ix=1akz" => "https://play.nim-lang.org/#ix=1apm"
18:01:22ZevvPMunch: https://constraints.cs.washington.edu/solvers/disjuncts.pdf there you go
18:01:24Zevvhave a nice evening
18:04:41FromDiscord<shadow.> ah the issue was file.read(T) doesnt return anything lmao
18:04:48FromDiscord<shadow.> how do i know when to stop reading?
18:05:14disrupteki think you should keep reading.
18:06:10FromDiscord<shadow.> your sarcasm never disappoints me
18:06:27disruptekthat makes one of us.
18:06:44FromDiscord<shadow.> lol
18:07:04FromDiscord<shadow.> i should rephrase then
18:07:28FromDiscord<shadow.> if reading from a stream into a byte array, how do i know when ive reached EOF aka when to stop the loop
18:08:05ZevvatEnd
18:08:06disruptekwhat does the manual say?
18:08:14Zevvthe manual says atEnd
18:08:19ZevvI looked it up for him
18:09:06FromDiscord<shadow.> thanks
18:09:16FromDiscord<nikki> Zevv you are the manual now
18:09:37ZevvI have mad manual skils
18:09:45disruptekwhat does it mean that i dream about dead people?
18:10:14FromDiscord<ache of head> 😳
18:10:17ZevvGuilt
18:10:21FromDiscord<shadow.> what does it say in the manual?
18:10:32disruptekit says `Guilt`.
18:10:41ZevvI looked it up for him
18:11:39FromDiscord<shadow.> !eval echo cast[array[10, byte]]("")
18:11:42NimBot[0, 0, 0, 0, 0, 0, 0, 0, 0, 226]
18:11:58FromDiscord<shadow.> interesting
18:12:02Zevvwhy
18:12:18FromDiscord<shadow.> idk
18:12:19FromDiscord<shadow.> lol
18:12:21FromDiscord<nikki> undefined behavior is fun i guess xD
18:12:43ZevvIt's not strictly "defined" as in "part of the manual". But the implementation is perfectly defined.
18:12:44FromDiscord<Idefau> !eval echo [0][0]
18:12:46NimBot0
18:12:46Zevvhttp://zevv.nl/nim-memory/
18:12:54FromDiscord<shadow.> !eval echo cast[array[10, byte]]([])
18:12:56NimBotCompile failed: Error: internal error: getTypeDescAux(tyEmpty)
18:13:00FromDiscord<shadow.> wait thats probably not going to wokr
18:13:00FromDiscord<shadow.> ye
18:13:01FromDiscord<shadow.> lol
18:13:13FromDiscord<shadow.> !eval echo cast[array[10, byte]]([0])
18:13:13*casaca joined #nim
18:13:15NimBot[0, 0, 0, 0, 0, 0, 0, 0, 160, 176]
18:13:20FromDiscord<shadow.> what
18:13:21Zevvyou are looking at the internal descriptor of the string. That's a length and a pointer.
18:13:40FromDiscord<nikki> the result of casting the string struct to an array10 in the C backend is undefined
18:13:40Zevvhttp://zevv.nl/nim-memory/#_lets_talk_about_seqs
18:14:22FromDiscord<nikki> there's whatever memory after it
18:14:41ZevvNope
18:14:45Zevvyou're not casting the string
18:14:55Zevvyou're casting the string descriptor. It's an object with a size and a pointer
18:15:01FromDiscord<nikki> yeah that's why i said string struct
18:15:08FromDiscord<nikki> that's what that means
18:15:12Zevvyou're downcasting from a large to an array of smaller things, so that's perfectly defined
18:15:47FromDiscord<nikki> the size of the string descriptor is not defined
18:15:58FromDiscord<nikki> it happens to be larger in this case
18:16:04ZevvWhy is it not defined?
18:16:14ZevvYou can find it in the nim code
18:16:24FromDiscord<nikki> the pointer can be 1 byte on a silly architecture
18:16:44Zevvnope.
18:16:54ZevvInt is never smaller then 16 bits
18:17:01Zevveven on 8 bit arch
18:17:31FromDiscord<nikki> right, that's 2 bytes. and a ptr could be 1 or 2 bytes. total is less than 10
18:17:34Zevvand a pointer and a long are guarenteed to be compatible by the C standard, IIRC
18:17:45Zevvsure, I didn't deny that :)
18:18:14FromDiscord<nikki> when it's less than 10 the result is undefined plus it can add arbitrary data in the padding in between if there is any
18:18:27FromDiscord<shadow.> !eval import sequtils; echo cast[array[10, byte]](repeat(0, 10))
18:18:30NimBot[80, 32, 219, 20, 20, 127, 0, 0, 144, 106]
18:18:40FromDiscord<nikki> hmm isn't long bigger than ptr on 32 bit archs
18:18:46FromDiscord<nikki> i thought long was 64 there
18:18:50FromDiscord<nikki> may be wrong
18:18:52FromDiscord<shadow.> all im trying to do is send an ending flag through a socket
18:18:59FromDiscord<shadow.> but i have no idea what type of flag to send
18:19:03FromDiscord<shadow.> bc im reading as an array[1000, byte]
18:19:04FromDiscord<shadow.> lmao
18:19:17FromDiscord<shadow.> and everything ive tried has undefined behaviour
18:20:59FromDiscord<nikki> the main place the undefined behavior comes from is the C impl, not the nim impl over the C which we could take as defined
18:21:29FromDiscord<nikki> @shadow. if you have some format for the msgs it could be outside that format right
18:21:43FromDiscord<shadow.> hmm well
18:22:12FromDiscord<shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2E23
18:22:15FromDiscord<shadow.> thats how im sending
18:22:15ZevvSure, and Nim doesn't bring you safety like Js or lua does. You can still deref a nim ref, for example.
18:22:26FromDiscord<shadow.> and im receiving as a array[1000, byte]
18:22:34FromDiscord<shadow.> so idk what type of array[1000, byte] is a good end flag
18:22:52FromDiscord<nikki> yeah def. i actually am pretty ok with unsafety and undefined behavior :p i just want metaprogramming. thx nim!
18:23:52FromDiscord<nikki> @shadow. keep around some other let or const buffer with some magic constants, then socket.send(thatBuffer) instead
18:24:01FromDiscord<nikki> and compare against it on other side?
18:24:05FromDiscord<shadow.> hmm ye fair enough
18:24:12FromDiscord<shadow.> im just thinking what kind of buffer sequence wouldnt be found in a file lol
18:24:17FromDiscord<shadow.> [6, 9, 6, 9, 6, 9, 6, 9
18:24:19FromDiscord<shadow.> (edit) "9" => "9]"
18:24:20FromDiscord<shadow.> yes
18:24:22FromDiscord<shadow.> im so mature
18:24:39FromDiscord<nikki> well another approach is always prefix your normal buffers with a different constant
18:24:44FromDiscord<nikki> then you can be sure
18:24:47FromDiscord<XeroOl> you could always just add an 1001st byte
18:24:54FromDiscord<shadow.> hmm
18:25:00FromDiscord<shadow.> well i have to preset the buffer type that im reading as
18:25:07FromDiscord<shadow.> and its already an array[1000, byte]
18:25:11FromDiscord<shadow.> (edit) "preset" => "predefine"
18:25:22FromDiscord<nikki> you can read to a slice of a buffer
18:25:30FromDiscord<shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2E24
18:25:31FromDiscord<shadow.> this is how im receiving
18:25:50FromDiscord<XeroOl> and you have to send 1000 bytes of data each time?
18:26:02FromDiscord<XeroOl> and the buffer has to also be 1000 bytes?
18:26:03FromDiscord<shadow.> i mean i dont have to ofc
18:26:09FromDiscord<shadow.> but dont i have to specify buffer size?
18:26:13FromDiscord<shadow.> OH WAIT
18:26:20FromDiscord<nikki> always send 4 constant bytes + N-4 data, then on the receiving end check the 4 bytes
18:26:22FromDiscord<shadow.> are you saying to always do a 1001 byte buffer
18:26:26FromDiscord<shadow.> but omit the last one
18:26:27FromDiscord<shadow.> or first one
18:26:33FromDiscord<shadow.> and then if the first/last one is present then stop?
18:26:47FromDiscord<nikki> the 4 const things are the message type
18:26:51FromDiscord<XeroOl> yeah I'm saying 1000 bytes are "message" bytes, and then 1 byte would be your "signal" byte
18:26:54FromDiscord<nikki> it's standard to have a message type + data format
18:26:58FromDiscord<shadow.> ohh ok
18:27:02FromDiscord<XeroOl> yeah something like that
18:27:23FromDiscord<nikki> makes sense to keep the message type at the beginning
18:27:30FromDiscord<shadow.> fair enough
18:27:31FromDiscord<shadow.> hm
18:27:37FromDiscord<nikki> do you always receive the same chunks u send?
18:27:43FromDiscord<nikki> or can it be rechunked differently
18:27:46FromDiscord<shadow.> well
18:27:46FromDiscord<nikki> in the protocol ur using
18:27:51FromDiscord<shadow.> tcp?
18:27:53FromDiscord<shadow.> wdym
18:28:09FromDiscord<nikki> like if you send 1234
18:28:19FromDiscord<nikki> can the lib give you two recvs with 12 and 34
18:28:39FromDiscord<shadow.> hmm
18:28:41FromDiscord<shadow.> well
18:28:47FromDiscord<shadow.> i think i have an idea of how to do it now
18:28:52FromDiscord<shadow.> you can concatenate arrays with an operator right
18:29:29FromDiscord<nikki> maybe don't concat, just keep a buffer, and read to sub slices of it
18:29:33FromDiscord<nikki> as i was tryna indicate earlier
18:29:39FromDiscord<shadow.> well yeah id do that but i needa pass an address
18:29:44FromDiscord<shadow.> so i need to store it in a variable right
18:29:50FromDiscord<nikki> read file data to the address of the subslice
18:29:51FromDiscord<shadow.> cant just do a temp slice
18:29:57FromDiscord<shadow.> i was gonna have one var fileBuffer and one for packetBuffer?
18:30:00FromDiscord<shadow.> if thats alr
18:30:02FromDiscord<shadow.> lo
18:30:04FromDiscord<shadow.> (edit) "lo" => "llo"
18:30:06FromDiscord<shadow.> (edit) "llo" => "lol"
18:30:13FromDiscord<nikki> you can do what i just said
18:30:19FromDiscord<shadow.> alright
18:30:28FromDiscord<shadow.> ty
18:30:39FromDiscord<nikki> i'm not sure exactly the syntax but yeah
18:30:41FromDiscord<shadow.> !eval echo 0b
18:30:44NimBotCompile failed: /usercode/in.nim(1, 8) Error: invalid number: '0b'
18:30:47FromDiscord<shadow.> f
18:30:53FromDiscord<shadow.> is there a byte literal or do you just use the byte proc
18:31:00FromDiscord<shadow.> !eval echo 0'byte
18:31:03NimBotCompile failed: /usercode/in.nim(1, 7) Error: invalid number: '0'b'
18:31:11FromDiscord<shadow.> rip
18:31:17FromDiscord<shadow.> !eval echo 0.byte
18:31:19FromDiscord<shadow.> ye that should wor
18:31:20NimBot0
18:31:29*antranigv quit (Quit: ZNC 1.7.5 - https://znc.in)
18:32:01FromDiscord<nikki> Zevv whatcha coding these days
18:32:09FromDiscord<nikki> also disruptek
18:32:17FromDiscord<shadow.> !eval import sequtils; echo cast[array[2, byte]](repeat(0, 2))
18:32:19NimBotCompile failed: /usercode/in.nim(1, 23) Error: expression cannot be cast to array[0..1, byte]
18:32:25FromDiscord<nikki> feel like y'all weren't as present on chat yesterday as usual
18:33:14FromDiscord<nikki> @shadow. it may be better to work in terms of places vs. expressions
18:33:21FromDiscord<nikki> like make a buffer. then write things to it
18:33:28FromDiscord<shadow.> yeah i think ive figured it out now
18:33:41FromDiscord<shadow.> im just tryna figure out how to make an array[1000, 0.byte] with a function lol
18:34:47FromDiscord<nikki> well, it's usually zeroed by default
18:34:54FromDiscord<nikki> otherwise i would personally for loop
18:35:09FromDiscord<nikki> or i think there's .fill or sth like that
18:35:13FromDiscord<shadow.> hmm ok
18:35:32FromDiscord<nikki> like make an array. for loop and fill it with stuff
18:35:37FromDiscord<nikki> works every time, everywhere
18:36:05FromDiscord<shadow.> fair enoughj
18:36:06FromDiscord<shadow.> (edit) "enoughj" => "enough"
18:36:21FromDiscord<shadow.> !eval var x: array[10, byte]; echo x
18:36:24NimBot[0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
18:36:27FromDiscord<shadow.> nice
18:37:09FromDiscord<Idefau> couldn't see that coming
18:37:21*rusua joined #nim
18:37:51FromDiscord<shadow.> ikr
18:43:53disrupteki'm trying to get some office space so i can type during the winter.
18:44:13disruptekalso writing a few lines to integrate ic into the module graph.
18:45:11disruptekwhat are you up to?
18:45:28FromDiscord<Idefau> vibing
18:45:33disrupteknice.
18:45:56disruptekyou can have more seqs with the types of your choosing. rtfm.
18:46:05disruptekor just hang out on craigslist.
18:46:22FromDiscord<Idefau> or just sell yourself on craiglist
18:46:51disrupteki need to find a prostate massager that doesn't interrupt my code flow.
18:47:15FromDiscord<Idefau> I'm a certified prostate massager in Cambodia
18:47:37disruptekhave any friends in the business who are a little more local to the northeast states?
18:48:09FromDiscord<Idefau> yes, but they are just me with fake IDs
18:48:36disruptekclyybber: speaking of massage, how is your pr coming?
18:49:36*solitudesf quit (Quit: Leaving)
18:49:54*solitudesf joined #nim
18:51:42*solitudesf quit (Client Quit)
18:52:04*solitudesf joined #nim
18:57:55FromDiscord<shadow.> hmm if a file is say 5.5kb and im reading it using `array[1000, byte]` then how do i read that last chunk lol
18:58:29disruptekit can't be that important, right?
18:58:42mipriyou're told how much data you've actually read, so you only consider that part of the array.
18:58:57FromDiscord<shadow.> well
18:59:04FromDiscord<shadow.> i get an error when i try to read the last chunk
18:59:11mipriask a question about it then
18:59:17FromDiscord<shadow.> and obviously .atEnd() is telling me i havent read it all
18:59:21FromDiscord<shadow.> wdym?
18:59:27FromDiscord<lqdev> what's. the. error.
18:59:30FromDiscord<shadow.> smart
18:59:31FromDiscord<shadow.> one sec
18:59:41FromDiscord<Idefau> what's an error
18:59:51FromDiscord<shadow.> `Error: unhandled exception: cannot read from stream [IOError]`
18:59:56FromDiscord<shadow.> idk i think it makes ur code run faster?
19:00:03FromDiscord<shadow.> i mean mine always finish faster with errors
19:00:32FromDiscord<Idefau> when you get an error just wrap it in a try except
19:00:34FromDiscord<lqdev> how are you reading from the stream?
19:00:35FromDiscord<Idefau> that always solves it
19:00:48disruptekdiscard is your friend.
19:00:53miprican't argue with that. You're not getting the error there, which is disappoitning. Try looking at the actual syscalls with strace
19:01:39FromDiscord<shadow.> my reading is disgusting but ok one sec
19:01:48miprior is it possible that you're using a function that throws an error if it can't read at least a certain amount of data? use some other function then.
19:01:55FromDiscord<shadow.> actually here one sec
19:01:58*astronavt joined #nim
19:02:10FromDiscord<shadow.> sent a code paste, see https://paste.rs/aWG
19:02:28FromDiscord<shadow.> im guessing it doesnt say its at the end since theres still some amount of bytes left but that amount is less than the buffer size?
19:03:27miprireading from files that aren't exactly a multiple of a buffer's size is completely normal. what's supposed to happen is that you're told how much is actually read.
19:04:42FromDiscord<shadow.> hmm
19:04:50FromDiscord<shadow.> file.read() doesnt return anything when using a T buffer iirc
19:05:12FromDiscord<shadow.> yeah no it doesnt lol
19:06:05miprihttps://github.com/nim-lang/Nim/blob/version-1-4/lib/pure/streams.nim#L410
19:06:11miprithis isn't an API that permits short reads
19:08:02FromDiscord<shadow.> ah
19:08:05FromDiscord<shadow.> lemme find a better one then i suppose
19:08:28miprireadDataStr or readStr look better.
19:09:51FromDiscord<shadow.> readData?
19:09:54FromDiscord<shadow.> that seems it'd work
19:11:07FromDiscord<shadow.> thanks
19:12:38miprinp. I think the docs are faulty in this case. Need to do a better job of communicating what the functions are *for*, not just what types of data to pass to them
19:13:07FromDiscord<Idefau> just deduce from the data to pass
19:13:17FromDiscord<lqdev> the error message is quite confusing, too
19:13:26FromDiscord<shadow.> yeah a little bit
19:13:37FromDiscord<shadow.> i suppose i shoulda looked at the low level functions before the higher level ones rather than vice versa
19:13:46FromDiscord<shadow.> !eval echo (var x = 5)
19:13:48NimBotCompile failed: /usercode/in.nim(1, 6) Error: type mismatch: got <void>
19:13:52FromDiscord<shadow.> damn
19:14:09FromDiscord<shadow.> any way to get a returned assignment?
19:14:14FromDiscord<lqdev> `couldn't read enough bytes to fill {T}` would've been a better error
19:14:18FromDiscord<shadow.> ye
19:14:21FromDiscord<lqdev> !eval (var x = 5; x)
19:14:23NimBotCompile failed: /usercode/in.nim(1, 13) Error: expression 'x' is of type 'int' and has to be used (or discarded)
19:14:30FromDiscord<lqdev> !eval echo (var x = 5; x)
19:14:32NimBot5
19:14:35FromDiscord<shadow.> thanks
19:14:40FromDiscord<Idefau> !eval for x in 0..100: discard x
19:14:42NimBot<no output>
19:14:44FromDiscord<Idefau> brutal
19:14:46FromDiscord<shadow.> lol
19:14:53FromDiscord<shadow.> now just do factorial(100)
19:15:24FromDiscord<Idefau> while true: discard
19:15:51FromDiscord<shadow.> oh hell nah
19:15:56FromDiscord<shadow.> lmao im guessing it has a timeout?
19:16:06FromDiscord<Idefau> yes
19:16:10FromDiscord<Idefau> sadly
19:16:24FromDiscord<shadow.> rip
19:16:33FromDiscord<shadow.> make it spawn subprocesses?
19:16:36FromDiscord<shadow.> (pls dont)
19:16:39FromDiscord<Idefau> hmmmm
19:16:59FromDiscord<shadow.> just fetch a self-calling exe from a website using httpclient and run that
19:17:02FromDiscord<Idefau> !eval import os; os.exec("ls")
19:17:05NimBotCompile failed: /usercode/in.nim(1, 15) Error: undeclared identifier: 'exec'
19:17:12FromDiscord<Idefau> damn
19:17:14FromDiscord<shadow.> no need for os lol
19:17:19FromDiscord<shadow.> right?
19:17:25FromDiscord<shadow.> like exec() and os.exec() both work correct
19:17:27FromDiscord<shadow.> or am i being dumb
19:17:39FromDiscord<Idefau> !eval import os; os.execShellCmd("ls")
19:17:43NimBotCompile failed: /usercode/in.nim(1, 27) Error: expression 'execShellCmd("ls")' is of type 'int' and has to be used (or discarded)
19:17:49FromDiscord<shadow.> LOL
19:17:50FromDiscord<Idefau> i am very smart
19:17:54FromDiscord<Idefau> you get the point
19:17:55FromDiscord<lqdev> `exec` is from `nimscript`
19:17:55FromDiscord<shadow.> yes
19:18:00FromDiscord<lqdev> not `os`
19:18:03FromDiscord<Idefau> right
19:18:07FromDiscord<shadow.> so in other words
19:18:13FromDiscord<shadow.> httpclient to download a self calling exe
19:18:17FromDiscord<shadow.> and then run and disown from script
19:18:18FromDiscord<shadow.> boom
19:18:23FromDiscord<shadow.> loo
19:18:25FromDiscord<shadow.> (edit) "loo" => "lol"
19:18:26FromDiscord<shadow.> not exe
19:18:28FromDiscord<shadow.> executable
19:18:31FromDiscord<shadow.> im a fuckin windows kiddy sry
19:19:28FromDiscord<ache of head> 😔
19:20:20FromDiscord<shadow.> hmm
19:20:26FromDiscord<shadow.> so ive got the read thing down using some awful code
19:20:44FromDiscord<shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2E2k
19:20:48FromDiscord<Idefau> uh
19:20:50FromDiscord<shadow.> but when i echo fileBuffer its just 1000 bytes
19:20:54FromDiscord<shadow.> not 218 or whatever
19:21:12FromDiscord<shadow.> (edit) "but when i echo fileBuffer its just 1000 bytes ... " added "mostly != 9"
19:21:14FromDiscord<shadow.> (edit) "9" => "0"
19:21:58miprifileBuffer's still an array[1000, byte]? that's not going to change.
19:22:09FromDiscord<shadow.> yes but shouldnt it be padded on one size wiht 0 bytes?
19:22:22FromDiscord<shadow.> im just confused as to how its reading 1000 full bytes into the array if it read 218
19:22:31FromDiscord<shadow.> (edit) "size wiht" => "side with"
19:22:32mipriit's not, it's only reading 218
19:22:46FromDiscord<shadow.> when i echoed there was like 1000 values in the array is what i meant
19:22:58mipribecause it's an array[1000, byte]. that's not going to change
19:23:07FromDiscord<shadow.> so which of the bytes are the 218 read
19:23:13FromDiscord<Idefau> the first 218
19:23:17FromDiscord<Idefau> i guess
19:23:18FromDiscord<shadow.> alr ty
19:23:30mipriyes, definitely the first 218 after the address you pass.
19:23:33FromDiscord<shadow.> so like fileBuffer[0..<bytesRead] ?
19:23:59mipriyou could take a fileBuffer.toOpenArray(0, bytesRead-1), or do whatever.
19:24:09miprireadDataStr will change the length of the string for you
19:24:40FromDiscord<shadow.> hmm
19:24:54miprireadStr rather.
19:24:59FromDiscord<shadow.> how can a string hold every type of byte? im reading an image file and arent certain bytes not representable as a character
19:25:05FromDiscord<shadow.> (edit) "type of byte?" => "byte value?"
19:25:06miprinote the setLen calls in https://github.com/nim-lang/Nim/blob/version-1-4/lib/pure/streams.nim#L930
19:25:27FromDiscord<shadow.> i probably dont understand nim string encodings well
19:25:27FromDiscord<shadow.> lmao
19:25:28FromDiscord<Idefau> i love reading nim lib source code
19:25:40mipriNim strings aren't guaranteed or required to contain valid Unicode. Certain operations on them can require that.
19:25:47FromDiscord<shadow.> ohhh
19:25:52FromDiscord<shadow.> hmm ok
19:26:27FromDiscord<shadow.> !eval echo [1, 2, 3, 4, 5, 6][0..<4]
19:26:30NimBot@[1, 2, 3, 4]
19:26:34FromDiscord<shadow.> nice
19:27:30miprianother thing you could do is use a seq[byte] for fileBuffer, and pass fileBuffer[0].addr as the buffer
19:27:49FromDiscord<Idefau> slice and backwards index are the best thing on this planet
19:27:59FromDiscord<shadow.> i agree
19:28:07FromDiscord<shadow.> when i started learning c++ after py
19:28:08FromDiscord<shadow.> i was like
19:28:16FromDiscord<shadow.> ok so where tf are my negative indexes and slices at
19:28:18mipri!eval var x = @[1, 2, 3, 4, 5, 6]; x.setLen(4); echo x
19:28:21NimBot@[1, 2, 3, 4]
19:28:27FromDiscord<shadow.> oh dang
19:28:29FromDiscord<shadow.> thats pretty easy
19:28:50FromDiscord<shadow.> !eval var x = @[1, 2, 3, 4, 5, 6]; x = x[0..<4]; echo x
19:28:50FromDiscord<Idefau> !eval stdin.echo("epic")
19:28:53NimBot@[1, 2, 3, 4]
19:28:53NimBotCompile failed: /usercode/in.nim(1, 6) Error: type mismatch: got <File, string>
19:29:00FromDiscord<Idefau> right
19:29:06FromDiscord<Idefau> !eval stdin.write("epic")
19:29:08NimBot/usercode/in.nim(1) in↵/playground/nim/lib/system/io.nim(156) checkErr↵/playground/nim/lib/system/io.nim(139) raiseEIO↵Error: unhandled exception: errno: 0 `No error information` [IOError]
19:29:09FromDiscord<shadow.> lol
19:29:10mipritry stdout.writeLine
19:29:13FromDiscord<shadow.> lmfao
19:29:14FromDiscord<Idefau> destroyed
19:29:22FromDiscord<shadow.> i think hes purposefully using stdin
19:29:23FromDiscord<shadow.> lol
19:29:42FromDiscord<Idefau> !eval discard stdout.readLine()
19:29:44NimBot/usercode/in.nim(1) in↵/playground/nim/lib/system/io.nim(477) readLine↵/playground/nim/lib/system/io.nim(446) readLine↵/playground/nim/lib/system/io.nim(156) checkErr↵/playground/nim/lib/system/io.nim(139) raiseEIO↵Error: unhandled exception: errno: 0 `No error information` [IOError]
19:29:46FromDiscord<shadow.> oh lord
19:52:40FromDiscord<shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2E2t
19:52:44FromDiscord<shadow.> is bytesRead out of scope in the else statement?
19:53:20FromDiscord<shadow.> hm
19:53:31FromDiscord<shadow.> !eval (let x = 5); echo x
19:53:33NimBot5
19:53:41FromDiscord<shadow.> (edit) "!eval ... (let5;" added "discard" | "5);" => "5; x);"
19:53:44FromDiscord<shadow.> !eval discard (let x = 5; x); echo x
19:53:47NimBot5
19:53:50FromDiscord<shadow.> hm
19:54:27*Vladar quit (Remote host closed the connection)
19:57:22*Vladar joined #nim
20:03:15*lritter quit (Quit: Leaving)
20:05:27FromDiscord<krabbypatty> `if (let bytesRead = file.readData(fileBuffer.addr, fileBuffer.len); bytesRead) == 0:`
20:05:29FromDiscord<krabbypatty> huh
20:05:30FromDiscord<krabbypatty> what is this
20:06:00FromDiscord<shadow.> yeah i got rid of it lmao
20:06:04FromDiscord<shadow.> was suppose to be an assignment expression
20:06:09FromDiscord<krabbypatty> `if (let x = ...; x)`
20:06:10FromDiscord<shadow.> i think there was a scope issue
20:06:12FromDiscord<krabbypatty> is that valid nim?
20:06:15FromDiscord<shadow.> ye
20:06:22FromDiscord<shadow.> () is an expression
20:06:23FromDiscord<krabbypatty> is it assigning to x only inside the if scope?
20:06:28FromDiscord<shadow.> i think thats what it is ye
20:06:30FromDiscord<shadow.> i fixed it
20:06:30FromDiscord<krabbypatty> lol
20:06:34FromDiscord<krabbypatty> but isn't let an statement
20:06:40FromDiscord<shadow.> lmao
20:06:42FromDiscord<shadow.> dont question it
20:06:45FromDiscord<krabbypatty> lol wtf
20:06:47FromDiscord<shadow.> loool
20:06:48FromDiscord<shadow.> i fixed it
20:06:48FromDiscord<shadow.> dw
20:06:50FromDiscord<shadow.> ok but
20:06:54FromDiscord<shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2E2v
20:06:55FromDiscord<shadow.> how is this casting differently
20:06:56FromDiscord<shadow.> every single time
20:07:09FromDiscord<shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2E2w
20:07:11FromDiscord<shadow.> that does not make sense
20:07:41FromDiscord<shadow.> im guessing im not understanding how casts work
20:07:45FromDiscord<shadow.> probably bc its converting to a vec?
20:07:46FromDiscord<krabbypatty> it's nim punishing you for doing (let x = ...; x)
20:07:48FromDiscord<shadow.> (edit) "vec?" => "seq?"
20:07:51FromDiscord<shadow.> shush
20:08:04FromDiscord<shadow.> !eval echo (let y = 5; y 2)
20:08:06NimBotCompile failed: /usercode/in.nim(1, 20) Error: invalid token: (\29)
20:08:12FromDiscord<krabbypatty> 😮
20:08:19FromDiscord<shadow.> !eval echo (let y = 5; y); echo y
20:08:21NimBot5↵5
20:08:25FromDiscord<shadow.> ya like that?
20:08:25FromDiscord<krabbypatty> lmao wtf
20:08:34FromDiscord<shadow.> its an expression
20:08:37FromDiscord<shadow.> the last part is returned
20:08:39FromDiscord<shadow.> so in expression scope
20:08:43FromDiscord<shadow.> (let x = 5; x)
20:08:44FromDiscord<shadow.> x is returned
20:08:47FromDiscord<krabbypatty> right but I'd assume that let is a statement
20:08:56FromDiscord<krabbypatty> and statements usually don't make sense inside expressions lol
20:09:00FromDiscord<shadow.> hmm
20:09:02FromDiscord<shadow.> idk
20:10:59FromDiscord<shadow.> ok so i think its casting the address instead of the actual content of the vec lmfao
20:11:02FromDiscord<shadow.> (edit) "vec" => "seq"
20:11:10FromDiscord<shadow.> now i needa figure out how to convert a seq to an int
20:13:17FromDiscord<shadow.> bit shifts
20:13:20FromDiscord<shadow.> nice
20:25:22FromDiscord<kodkuce> does nim have like some c# style comments for procs
20:25:33FromDiscord<ElegantBeef> Yep
20:25:55FromDiscord<ElegantBeef> https://nim-lang.org/docs/manual.html#lexical-analysis-multiline-comments
20:26:15FromDiscord<ElegantBeef> last one there shows documentation comments
20:26:23FromDiscord<kodkuce> ok nice
20:26:51FromDiscord<ElegantBeef> @shadow. this is probably what you want to do https://play.nim-lang.org/#ix=2E2z
20:27:11FromDiscord<kodkuce> just worked soem unity gig with c# and i remmebr how nice is autocomplete and stuff
20:27:32FromDiscord<shadow.> @ElegantBeef i just did buffer[0] + buffer[1] shl 8 lol
20:27:36FromDiscord<shadow.> since its just a 2 long slice
20:28:05FromDiscord<ElegantBeef> Autocomplete exists in nim 😄
20:28:17*lritter joined #nim
20:29:51FromDiscord<lqdev> but it's a horrible experience compared to other languages
20:30:35FromDiscord<lqdev> sorry for bullying nimsuggest so much, but i hope that with enough bragging somebody will pick it up and make it better
20:30:46FromDiscord<lqdev> since i myself don't have time for that
20:30:51disrupteksure you do.
20:30:59disruptekand you're talented enough to fix it.
20:31:08*vicfred joined #nim
20:31:18disrupteki'm doing the lazy symbol lookup from ic right now.
20:31:29*Jesin quit (Quit: Leaving)
20:32:08FromDiscord<lqdev> look disruptek, i may be "talented" as you say but the nim compiler is big, scary and not written by me
20:32:15disruptekso what?
20:32:19FromDiscord<lqdev> so i don't know what does what
20:32:31disruptekit's written in nim. it's pretty easy to read.
20:32:37disruptekplus, there are people who have btdt.
20:32:45FromDiscord<lqdev> so fixing stuff would take 100x longer than just writing my own code
20:33:00*astronavt quit (Disconnected by services)
20:33:10disrupteknope; you aren't going to reimpl nimsuggest.
20:33:30*astronavt_ joined #nim
20:33:36disruptektrust me, the new ic stuff makes this super easy and fast.
20:34:09FromDiscord<lqdev> ic doesn't sound particularly "easy" to implement nor work with
20:34:16disruptekwell, it is.
20:34:37disrupteki promise you it's easier than whatever you're working on.
20:34:46*astronavt joined #nim
20:35:04FromDiscord<lqdev> you're challenging my stupid box layout engine in simplicity?
20:35:10disruptekyep.
20:35:21*astronavt_ quit (Client Quit)
20:35:47FromDiscord<ElegantBeef> Hoping someone will make FOSS better is exactly against the idea of FOSS 😄
20:36:39disruptek"the good thing about reinventing the wheel is you can get a round one"
20:43:22FromDiscord<shadow.> is `file.write(seq[byte])` not the correct way to write a sequence of bytes to a stream?
20:43:58FromDiscord<shadow.> it seems to be writing a bunch of 0's
20:45:17FromDiscord<ElegantBeef> I know for streams it'll write the address
20:45:22FromDiscord<shadow.> damn
20:45:26FromDiscord<shadow.> should i just use a for loop then
20:45:28FromDiscord<shadow.> and write all the items
20:46:27FromDiscord<shadow.> worked
20:47:04*rusua quit (Quit: Connection closed for inactivity)
20:47:38Zevvlqdev: you handy with macros and AST?
20:47:44FromDiscord<lqdev> yeah
20:48:27Zevvwell, there you go
20:48:31Zevvthat's all the compiler does
20:48:42Zevvit's ast all the way down
20:48:50disruptekwe don't use macros in the compiler.
20:48:57Zevvsure
20:49:12Zevvit's not about that. But the concept is the same. You get a tree of stuff in, and make a tree of stuff out
20:49:16Zevvrepeat until C
20:49:20disruptekactually, this is a new ast, but yeah.
20:49:27disrupteksame same but different.
20:55:35planetis[m]There is also a proc that pretty prints nodes, how what it named again?
20:55:48Zevvrepr
20:55:50Zevvtreerepr
20:56:25*Jesin joined #nim
20:57:34planetis[m]thats for macros, i think the compiler uses something different
20:57:55disruptekdebug
20:57:58*neceve quit (Ping timeout: 260 seconds)
20:58:21disruptekastalgo.debug, that is.
20:58:31planetis[m]yes thank you
21:00:06planetis[m]personally I hadn't met any bugs in the compiler recently, it's pretty robust imo
21:07:54*habamax quit (Ping timeout: 260 seconds)
21:10:10disruptekmy favorite part is the many useful comments.
21:11:58planetis[m]lol yeah thats a big problem
21:13:02disruptekonce upon a time araq promised to write a doc comment for every new proc.
21:13:17disruptekthat lasted about, oh.. one commit.
21:14:29planetis[m]its impossible to now whats happening, sometimes you are only saved if you run nim temp many times and add debug
21:14:55disrupteki just shake my fist and the bugs run away.
21:16:24FromDiscord<Idefau> i am known as the bug attractor
21:16:48FromDiscord<lqdev> ✝️
21:18:34planetis[m]i just pray, they disappear
21:27:45*narimiran quit (Ping timeout: 240 seconds)
21:29:29FromDiscord<shadow.> hm
21:29:39FromDiscord<shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2E2X
21:29:41FromDiscord<shadow.> is there a better way than sleep
21:29:47FromDiscord<shadow.> to ensure the packets are all sent
21:29:53FromDiscord<shadow.> for some reason when i remove it it just sends one packet
21:29:54FromDiscord<shadow.> and then closes
21:33:08FromDiscord<lqdev> async sockets and waitFor?
21:35:14FromDiscord<dom96> First you should avoid `cast` and `addr`
21:38:08planetis[m]...then get a real job and get rich
21:38:37planetis[m]sorry we all waited after the first something would follow
22:09:27*solitudesf quit (Ping timeout: 260 seconds)
22:09:57FromDiscord<shadow.> i fixed it nvm
22:15:30FromDiscord<shadow.> !eval echo cast[array[2, byte]](1000u16)
22:15:33NimBot[232, 3]
22:23:43Zevvcast away boys, cast away
22:25:39FromDiscord<shadow.> yes
22:25:50FromDiscord<shadow.> is there a better way to write a seq[byte] to a stream than using a for loop?
22:26:00FromDiscord<shadow.> normally it just writes the address lmao
22:26:54FromDiscord<lqdev> writeData?
22:27:08FromDiscord<shadow.> hmm
22:27:09FromDiscord<shadow.> lemme check
22:27:49FromDiscord<nikki> yeah `stream.writeData(theSeq[0].addr, theSeq.len sizeof(theSeq[0]))`
22:28:00FromDiscord<nikki> or something like that
22:28:15FromDiscord<shadow.> `stream.writeData(seq.addr, seq.len)` worked
22:28:27FromDiscord<shadow.> since its a seq[byte]
22:28:30FromDiscord<shadow.> :p
22:28:47FromDiscord<nikki> how did you check that it worked
22:28:52FromDiscord<nikki> like does it simply compile
22:29:02FromDiscord<shadow.> it saved
22:29:05FromDiscord<shadow.> the file
22:29:06FromDiscord<shadow.> lol
22:29:16FromDiscord<shadow.> all 977kb accurately
22:29:36disruptek!repo nesm
22:29:36disbothttps://github.com/xomachine/NESM -- 9NESM: 11NESM stands for Nim's Easy Serialization Macro. The macro that allowing generation of serialization functions by one line of code! (It is a mirror of https://gitlab.com/xomachine/NESM) 15 41⭐ 2🍴
22:29:38FromDiscord<nikki> huh weird, i'd've thought `theSeq.addr` would just give the address of the seq object which is different from that of its data payload
22:29:42disruptek!repo frosty
22:29:42disbothttps://github.com/disruptek/frosty -- 9frosty: 11serialize native Nim types to strings, streams, or sockets ⛄ 15 16⭐ 0🍴
22:31:06ForumUpdaterBotNew thread by Snej: ANN: NimDBX, a super-fast persistent key-value store, see https://forum.nim-lang.org/t/7087
22:40:47*tane joined #nim
22:43:25*Amun_Ra quit (Ping timeout: 264 seconds)
22:44:54FromDiscord<dom96> wassup nimglets
22:45:20FromDiscord<ache of head> XDDDD
22:45:21FromDiscord<ElegantBeef> So offensive
22:45:25FromDiscord<ElegantBeef> Reported to your local feds
22:47:28FromDiscord<ache of head> 😳
22:47:49FromDiscord<nikki> sup. wanting to code on project but being distracted by fun people on discord
22:49:08FromDiscord<ElegantBeef> Fun people... and beef 😛
22:49:16FromDiscord<dom96> gotta deinstall dat Discord
22:49:28FromDiscord<Recruit_main707> I have a question, compile time code runs on the VM, correct?↵So do nimscripts, what’s the reason for all the cool Nimscript functions like mkDir, etc, etc. to not be usable at normal compile time code?
22:49:54FromDiscord<dom96> Aren't they usable?
22:50:00FromDiscord<Recruit_main707> (edit) "at" => "in"
22:50:28planetis[m]dom96: can you give the go ahead for https://github.com/nim-lang/Nim/pull/15919 ?
22:50:29disbotHttpclient improvements
22:50:46FromDiscord<Recruit_main707> You can’t really import them
22:50:48planetis[m]basically i need your blessings.
22:50:57planetis[m] i know where have i fallen into
22:51:07FromDiscord<dom96> Not tonight, spent all my PR energy
22:51:26planetis[m]out of juice i see
22:51:47FromDiscord<dom96> yep, trying to spend what little energy I have left to figure out why my ESP code crashes
22:54:09FromDiscord<tinygiant> sent a code paste, see https://play.nim-lang.org/#ix=2E3t
22:55:21FromDiscord<ElegantBeef> Stringstreams dont exist, they're just streams with different read,write, implementations
22:55:38FromDiscord<ElegantBeef> So yes the data should be the same
22:56:03*Amun_Ra joined #nim
22:56:21FromDiscord<ElegantBeef> Oh i guess i'm wrong they do have a T
22:56:43planetis[m]maybe a stringstream bug?
22:57:04FromDiscord<ElegantBeef> Can we see the code?
23:02:14FromDiscord<AmjadHD> Hi, can a 'symbol' be an unquoted keyword https://media.discordapp.net/attachments/371759389889003532/776945039506407434/unknown.png
23:02:29FromDiscord<AmjadHD> https://media.discordapp.net/attachments/371759389889003532/776945105319493642/unknown.png
23:02:36FromDiscord<AmjadHD> https://media.discordapp.net/attachments/371759389889003532/776945136370188298/unknown.png
23:03:04FromDiscord<ElegantBeef> you need to strop keywords with backticks
23:03:13FromDiscord<ElegantBeef> https://play.nim-lang.org/#ix=2E3J
23:03:24FromDiscord<ElegantBeef> It tells the system it's not a keyword but an identifier
23:04:25FromDiscord<AmjadHD> the bnf pattern in the grammar section of the manual says otherwise, see the first picture.
23:04:36FromDiscord<ElegantBeef> And the compiler says otherwise
23:04:45*lritter quit (Ping timeout: 240 seconds)
23:04:58planetis[m]Btw i havent heard disruptek's catchphrase in a while
23:05:04FromDiscord<ElegantBeef> Balls throbbing?
23:05:20planetis[m]No... i think not
23:05:46planetis[m]the other one
23:06:07FromDiscord<ElegantBeef> Idk what the other one is
23:06:49planetis[m]ok i'll remind you its hearts and minds
23:06:58FromDiscord<nikki> @AmjadHD how is `KEYW` defined?
23:07:25disruptekit's too cold to cheer; all i can do is chant.
23:07:56FromDiscord<nikki> it says it's an abstract terminal but doesn't actually define it
23:10:34FromDiscord<AmjadHD> @nikki it's not explicitly defined but, I believe it's the list of keywords https://nim-lang.org/docs/manual.html#lexical-analysis-identifiers-amp-keywords
23:11:33planetis[m]dont see it
23:12:05planetis[m]maybe its an easter egg
23:12:39miprihttps://github.com/nim-lang/Nim/issues/15806
23:12:41disbotbackticks : Using reserved keywords as identifiers is not documented ; snippet at 12https://play.nim-lang.org/#ix=2E3S
23:13:58FromDiscord<nikki> it's documented -- in the manual `symbol` includes backticks with anything inside
23:14:27FromDiscord<nikki> symbol = '`' (KEYW|IDENT|literal|(op ... from the manual
23:14:48FromDiscord<nikki> well; it's at least captured in some form. not sure if that counts as hthe documentation desired in the issue :p
23:14:48disrupteki don't know why we have to keep going over this.
23:15:07FromDiscord<nikki> probs bc. the "we" keeps changing
23:15:08FromDiscord<tinygiant> sent a long message, see http://ix.io/2E3W
23:15:37mipripeople wonder what it is, they don't find an answer in the docs, they ask here, they get told, the docs aren't updated, repeat.
23:16:25disrupteki guess it needs to be in more places in the docs. maybe a section specifically explaining identifier limits (or unlimits) can be linked in multiple places.
23:17:10disruptekyou can even have newlines in stropped identifiers. not a brilliant idea, but possible.
23:18:32*Vladar quit (Quit: Leaving)
23:19:16FromDiscord<ElegantBeef> @tinygiant are you setting the stringStream position to 0 before reading?
23:19:55FromDiscord<tinygiant> Yes and no. Both ways returned the same error.
23:20:20FromDiscord<ElegantBeef> Is the position moved?
23:20:27FromDiscord<ElegantBeef> After writting it it still 0
23:20:34FromDiscord<tinygiant> Didn't check that. One sec.
23:21:20FromDiscord<tinygiant> Same
23:21:29FromDiscord<ElegantBeef> Same as what?
23:22:08FromDiscord<tinygiant> Same error. Any attempt to access any part of the StringStream after it undergoes the write process results in that error. So if it's nil (maybe), I'll have to debug the function or write a new one.
23:22:24FromDiscord<ElegantBeef> What are you passing as the stream?
23:23:49*leorize quit (Quit: WeeChat 2.9)
23:26:34FromDiscord<tinygiant> sent a code paste, see https://play.nim-lang.org/#ix=2E41
23:26:42FromDiscord<AmjadHD> is stropping meant to be used like this ? https://media.discordapp.net/attachments/371759389889003532/776951199495880724/unknown.png
23:26:44FromDiscord<tinygiant> (edit) "https://play.nim-lang.org/#ix=2E41" => "https://play.nim-lang.org/#ix=2E42"
23:27:05FromDiscord<ElegantBeef> stropping is a backtick before and after the keyword
23:27:22FromDiscord<tinygiant> Before I was using a previously declared `Stream` and trying to use it as is and/or setting it to `newStringStream`.
23:28:15FromDiscord<ElegantBeef> setting it to a newStringStream should be fine
23:28:50*NimBot joined #nim
23:28:59*tane quit (Quit: Leaving)
23:29:03FromDiscord<Gyllou> has anyone worked with BitsRange before?
23:29:18FromDiscord<ElegantBeef> With what?
23:29:27FromDiscord<Gyllou> the type, BitsRange
23:29:45FromDiscord<Gyllou> BitsRange[T] = range[0 .. sizeof(T) 8 - 1]
23:30:07FromDiscord<Gyllou> i dont understand how to use it
23:30:39FromDiscord<AmjadHD> does this pattern allow whitespace: https://media.discordapp.net/attachments/371759389889003532/776952192862126130/unknown.png
23:30:54FromDiscord<Gyllou> trying to make something like seq[BitsRange]
23:31:17FromDiscord<ElegantBeef> it's `seq[BitsRange[T]]`
23:31:25FromDiscord<ElegantBeef> Insert your type for T
23:31:32FromDiscord<tinygiant> @ElegantBeef It does now. For some reason it wasn't working before, but I don't have my exact code from before so I can't tell you why. No worries, though, I'll just go with it. Thanks!
23:31:40FromDiscord<ElegantBeef> No problem
23:31:51FromDiscord<Gyllou> whenever I try to inset something like [int] it gives me a "got int expected system.int"
23:31:58*PMunch joined #nim
23:32:25FromDiscord<ElegantBeef> https://play.nim-lang.org/#ix=2E44
23:32:32FromDiscord<ElegantBeef> Do you have `int` aliased?
23:33:23FromDiscord<Gyllou> https://play.nim-lang.org/#ix=2E45 i was doing it like this
23:33:35FromDiscord<ElegantBeef> Why?
23:33:48FromDiscord<Gyllou> ugh because is started learning nim like two weeks ago lol
23:33:55FromDiscord<Gyllou> i dont get the generics syntax
23:34:09disruptekbitsrange is a range of bit positions that are expressable in the given type.
23:34:11FromDiscord<ElegantBeef> Well it's a `type` definition, so when you import the module if it is exposed you now have that type accessible
23:34:52disruptekBitsRange[int32] is a type range[0..31]
23:35:07FromDiscord<Gyllou> well yea i was importing bitops before, but it didnt want to let me instantiate it
23:35:31disruptekwell, it's a generic. you need to give it a type that you want it to use.
23:35:31FromDiscord<Gyllou> i mean i understand the concept, i just dont get how to declare it
23:35:44disruptekwhat are you trying to do?
23:35:50FromDiscord<Gyllou> var bits: BitsRange[int] = range[0 .. sizeof(int) 8 - 1] i feel like thats pretty explicit
23:35:52FromDiscord<ElegantBeef> Yep whenever you see `[T]` you need to give it the T you want
23:35:57miprianyway in your paste you're defining a variable, 'bits', which you give the type BitsRange[int], and then you try to assign a type to it.
23:35:58FromDiscord<ElegantBeef> No the right hand isnt needed
23:36:09FromDiscord<ElegantBeef> The right hand is as mipri put out a type
23:36:21FromDiscord<ElegantBeef> (edit) "put" => "pointed"
23:36:22FromDiscord<Gyllou> im making a bit based adjacency matrix to compare performance for a graph implementation
23:36:36FromDiscord<Gyllou> gotcha
23:36:43FromDiscord<ElegantBeef> Yea well i can use big words too, i am very photosynthetic
23:36:52disruptekright, so bits is a variable that takes any of 0..63.
23:37:52disruptekbits = 64 # compile-time error
23:37:58disruptekbits = 3 # okay
23:38:03disruptekbits = -1 # compile-time error
23:39:03FromDiscord<Gyllou> var bits: BitsRange[int] = so what syntax do i use on the rh side
23:39:09mipri63, 3, -1
23:39:11miprias above
23:39:16mipriit's a value
23:39:47miprialthough one of those is an error, it's at least still an error about a value that you're trying to assign to the variable
23:40:01miprirather than a type that's equivalent to the type you've already given the variable
23:40:09FromDiscord<Gyllou> var bits: BitsRange[int64] = [63] this through an error
23:40:18miprithat is an array.
23:40:32miprivar bits: array[1, BitsRange[int64]] = [63] should work
23:41:14miprihmm, no it doesn't handle the literaly nicely
23:41:25miprihttps://play.nim-lang.org/#ix=2E48
23:41:26FromDiscord<Gyllou> is that not an array containing a BitsRange?
23:41:34disruptekno.
23:42:00disrupteki would just compose what you want.
23:42:01miprihttps://play.nim-lang.org/#ix=2E49 <- without the array.
23:42:50FromDiscord<Gyllou> okay i got it now
23:42:59FromDiscord<Gyllou> now i feel dumb
23:43:07disrupteknah.
23:43:58FromDiscord<Gyllou> im trying to compare performance on using this as part of an adjacency matrix for the graph lib, the other implementation uses arraymancer
23:44:26FromDiscord<Gyllou> i plan to do an edge list/hashmap based version as well
23:44:45disruptekwell, arraymancer should be quite a bit faster because it can run in GPU.
23:44:49FromDiscord<Daniel> sent a code paste, see https://play.nim-lang.org/#ix=2E4c
23:45:03FromDiscord<Daniel> (edit) "https://play.nim-lang.org/#ix=2E4c" => "https://play.nim-lang.org/#ix=2E4d"
23:45:15FromDiscord<Gyllou> i would think so, its more of a trade off between m and n at that point
23:45:15disrupteki need to make a similar adjacency impl for my graph lib.
23:45:16FromDiscord<Daniel> (edit) "https://play.nim-lang.org/#ix=2E4d" => "https://play.nim-lang.org/#ix=2E4e"
23:45:30disruptekif you can contribute yours, i'll merge it.
23:45:42disruptekelse, mine will probably be slower but more idiomatic.
23:45:44FromDiscord<Daniel> (edit) "https://play.nim-lang.org/#ix=2E4e" => "https://play.nim-lang.org/#ix=2E4f"
23:46:12miprigreat content coming from discord right now.
23:46:37FromDiscord<Gyllou> i could be down with that, still trying to work out the scope for this, we are using it as an underlying data structure for own graph neural network
23:46:39disruptekas per usual.
23:47:11FromDiscord<Gyllou> (edit) "i could be down with that, still trying to work out the scope for this, we are using it as an underlying data structure for ... own" added "our"
23:47:59disruptekwell, i'm not against speed. it's just that the bigger priority for me is usability because i have too many disparate projects that share this stuff.
23:49:10disruptekbut gram does graph definition at compile-time, so it can handle widely varied designs.
23:49:19FromDiscord<Gyllou> gotcha, i will def push it to open source in some capacity. i'd really like to help out with nim as much as possible, but coming from the c/python ecosystem im a bit derpy and picking it up
23:49:51disruptekeh you'll be fine. it takes a little bit to get the nim perspective, but this is basically true with any language.
23:50:19FromDiscord<Gyllou> yea i havent had much reason until now to use many other languages, havent touched java since college really
23:50:36FromDiscord<Gyllou> made a text-to-speech server but that was it
23:51:10FromDiscord<Gyllou> im hoping i can bench this higher than julia lightgraphs
23:51:22disrupteklink?
23:51:24PMunchComing from C/Python is pretty much the perfect combo for learning Nim
23:51:25FromDiscord<Gyllou> i think it has the potential
23:51:44FromDiscord<Gyllou> https://github.com/JuliaGraphs/LightGraphs.jl
23:52:19FromDiscord<Gyllou> @PMunch I could see that, ive been in a bit of a bubble with embedded stuff though
23:52:42PMunchWell, Nim is a good fit for that as well :D
23:52:58FromDiscord<Gyllou> https://www.timlrx.com/2020/05/10/benchmark-of-popular-graph-network-packages-v2/
23:53:02PMunchRef this post from earlier today: https://forum.nim-lang.org/t/7083
23:53:06disrupteki don't think there are many limits to nim performance.
23:53:16FromDiscord<InventorMatt> PMunch, do you have any plans to update your BinaryParser?
23:54:30FromDiscord<Gyllou> @PMunch that seems interesting for sure
23:54:45FromDiscord<VideoCarp> what is Nim best used for?
23:54:52FromDiscord<Gyllou> we deciding a while back to not use RTOS, but even still
23:55:08FromDiscord<Gyllou> may deploy it on a dedicated sensor system
23:55:53FromDiscord<Gyllou> @VideoCarp it has a pretty wide range of applications and doesn't seem to be too limited in that regard
23:56:22FromDiscord<VideoCarp> yeah I know it isn’t limited for anything, but what is it the best for?
23:56:25disruptekhaxscramper is using gram, too. maybe we should impl some algos and start to actually make it faster.
23:57:13FromDiscord<nikki> doing really really awesome stuff. like really good
23:57:19FromDiscord<Gyllou> @VideoCarp i cant speak for all areas, but i can tell you that for machine learning and hpc it has the packages arraymancer, weave, and laser and they all perform extremely well
23:57:22FromDiscord<nikki> it's great for that
23:57:33FromDiscord<Gyllou> enough that my team is using nim instead of pure c
23:57:33FromDiscord<nikki> i personally think nim should be used for really dope things
23:57:51disruptekif it's not rad, it's not nim.
23:57:56FromDiscord<nikki> it's extra good if it's even better
23:58:02disruptekright?
23:58:03PMunch@InventorMatt, I don't have any specific plans for it at the moment. Haven't run into anything I'm missing while using it. Do you miss anything?
23:58:07FromDiscord<nikki> yah i totes agree
23:58:27FromDiscord<Gyllou> im hoping we can move most of our codebas over to nim by summer
23:58:29FromDiscord<VideoCarp> alright thanks. is there a place where I can find a list of built-in libs?
23:58:39FromDiscord<Gyllou> (edit) "codebas" => "codebase"
23:58:44disrupteknimble.directory
23:58:47FromDiscord<nikki> is a codbass something you put fish in
23:59:00miprinim-lang.org, documentation, standard library. you should 'nimble search' as well.
23:59:00FromDiscord<Gyllou> @nikki mmmm codbass and chips
23:59:03disruptekit's a cod that is baked with a bass inside.
23:59:03PMunch@VideoCarp: https://nim-lang.org/docs/lib.html
23:59:06FromDiscord<nikki> dang now i'm hungry
23:59:14FromDiscord<nikki> can we use nim to cook yet or no
23:59:18FromDiscord<Gyllou> les gf is making pot pie im excited
23:59:21FromDiscord<VideoCarp> thanks couldn’t find it
23:59:22disruptekkoch can cook.
23:59:23FromDiscord<nikki> i'm sure you could. it compiles to C. C runs on your toaster etc.
23:59:24PMunchAnd you have nimble.directory if you want to see everything you can install with `nimble install`.
23:59:31FromDiscord<Daniel> is this still actual?↵https://forum.nim-lang.org/t/5227 ↵i mean that parts that says: reading from stdin via asyncfile is not supported
23:59:43FromDiscord<InventorMatt> PMunch, I made an issue earlier on the repo but it appears it is reading in the numbers the wrong way at least in my use of it. u16 appears to be shifted left 8
23:59:49FromDiscord<Gyllou> https://nim-lang.org/documentation.html
23:59:58FromDiscord<Gyllou> checkout standard lib and manual sections