<<17-06-2019>>

00:00:59*Acid147 quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
00:01:36*theelous3 quit (Ping timeout: 248 seconds)
00:11:15*vlad1777d joined #nim
00:11:17*envoyt quit (Ping timeout: 245 seconds)
00:12:08*lritter quit (Ping timeout: 245 seconds)
00:13:02*lritter joined #nim
00:20:52*lritter quit (Ping timeout: 245 seconds)
00:21:37*Tyresc quit (Quit: WeeChat 2.5-dev)
00:49:31*hoijui quit (Ping timeout: 248 seconds)
01:15:28*nolanv quit (Ping timeout: 245 seconds)
01:19:07*nolanv joined #nim
01:19:33*theelous3 joined #nim
03:22:02*dddddd quit (Remote host closed the connection)
03:32:42*theelous3 quit (Ping timeout: 272 seconds)
03:34:18*fjellfras joined #nim
03:45:30*Snircle joined #nim
03:56:17*nsf joined #nim
03:57:10*xet7 joined #nim
04:17:16*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
04:20:51*Tanger joined #nim
04:32:37*lf-araujo joined #nim
04:35:12*lf-araujo quit (Client Quit)
04:37:36*lf-araujo joined #nim
04:46:45*laaron- quit (Remote host closed the connection)
04:48:31*laaron joined #nim
04:53:41*lf-araujo quit (Remote host closed the connection)
05:00:32*chimez joined #nim
05:03:11*chimez quit (Client Quit)
05:22:58*shashlick quit (Ping timeout: 245 seconds)
05:31:22*leorize quit (Quit: WeeChat 2.3)
05:51:40*narimiran joined #nim
06:02:41*leorize joined #nim
06:29:55*PMunch joined #nim
06:32:01FromGitter<alehander42> @arnetheduck not really sure what you mean: people write <a>It because they can't remember how the do (a: A): would look?
06:33:00FromGitter<alehander42> i've always thought its' just to make it obvious it's a macro invocation, not a call that you pass closures to
06:36:55*solitudesf joined #nim
06:37:01*couven92 joined #nim
06:37:24*nolanv quit (Quit: WeeChat 2.4)
06:37:42*hoijui joined #nim
06:37:45*Vladar joined #nim
06:40:06*nolanv joined #nim
06:42:28PMunchHmm, strange behaviour from nimble: http://ix.io/1M0m
06:42:54PMunchNotice how the second "Answer" doesn't have a "Prompt"
06:44:19*laaron quit (Remote host closed the connection)
06:46:46PMunchHmm, invalid pragma "unchecked". How can I do "CArray{.unchecked.}[T] = array[0..0, T]" now?
06:46:51*laaron joined #nim
06:47:14leorizeUncheckedArray[T]
06:49:09PMunchAha, thanks :)
06:55:02*Vladar quit (Remote host closed the connection)
06:55:25Araqhttps://youtu.be/yGYpyQv_tto
06:55:52*dGtlc3 quit (Ping timeout: 245 seconds)
06:56:19*dwdv joined #nim
06:56:26*dGtlc3 joined #nim
06:57:05*Vladar joined #nim
07:04:00*krux02 joined #nim
07:04:37*gmpreussner joined #nim
07:21:06lqdev[m]PMunch: keep in mind it must be `ptr UncheckedArray[T]`, otherwise it won't work
07:21:31leorizethere are usage for non-ptr unchecked array
07:22:40PMunchlqdev[m] apparently all my CArray uses were through pointers, so that's fine
07:24:30*fjellfras quit (Quit: Leaving)
07:33:10*Trustable joined #nim
07:47:27TangerHey folks, can I create a union object (1 bytes size) with 4 bits set as an enum with the {.size.} pragma?
07:48:17TangerAFAIK the .size pragma accepts an int, but there is only the smallest mention of the pragma in the docs (in the enum section)
07:48:58lqdev[m].size should only be used with enums
07:49:12lqdev[m]the param must be 1, 2, 4, or 8
07:49:21PMunchTanger, I think what you are looking for is the bitsize and packed pragmas
07:49:39lqdev[m]^
07:49:42PMunch(Unless you meant an actual union, in which case I'm not entirely sure what the question is)
07:49:42Tanger!!!!
07:50:25lqdev[m]yeah, unions are quite different from packed objects (which I think you were referring to)
07:53:35TangerAh, the packed pragma might be it. I was looking to get a 4-bit enum (using .sizes originally) and 4 bits to share the same byte in an object. I'll have a play with the packed pragma
07:54:44lqdev[m].bitsize is also a thing, if you don't need the whole object to be packed. use it like `some1bitBool {.bitsize: 1.}: bool` to get the effect you want
07:58:15PMunchTanger: https://play.nim-lang.org/index.html?ix=1M0y
07:58:57leorizethere's the {.union.} pragma btw
07:59:26PMunchYes, but I don't think he actually wants what C calls a union
07:59:27lqdev[m]thet's not what he wants
08:00:11leorizeah, I see
08:00:54TangerThanks PMunch and lqdev[m]! And thanks leorize, that's what I was originally going with, but I think .bitsize and .packed was what I wanted
08:01:51PMunchYeah, `union` will store things in the same memory location. Essentialy the same idea as a variant type in Nim, but without the enumerator and the type safety
08:03:18leorizePMunch: how did you do italics?
08:03:58TangerPMunch, Ah, do variants get stored the same way in memory? Like, would variant options on an object get converted to something like void*?
08:04:24lqdev[m]no, variants are stored as a 'tagged union'
08:04:51lqdev[m]that means a C union with an enum to denote what kind the variant is
08:05:22*floppydh joined #nim
08:05:29PMunchleorize, in HexChat you can hit Ctrl+I to toggle italics, Ctrl+B to toggle bold, and Ctrl+U to toggle underline. It's sent as control characters: en.wikichip.org/wiki/irc/colors
08:05:51*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
08:05:59PMunchlqdev[m], oh cool they are actually stored as a union?
08:06:02*laaron- joined #nim
08:06:03lqdev[m]yes
08:06:40livcdhmm in the new video krux02 sounds a bit like Araq
08:06:50*lqdev[m] sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/iIrjyvJpJEiNlIOvATLXgHvi >
08:07:04krux02livcd: do I?
08:08:01PMunchlqdev[m], cool
08:08:24PMunchI was actually going to go down the rabbit hole of how Nim types are actually stored and do a little write-up of them
08:08:30lqdev[m]ofc all the names are mangled but you get the idea
08:08:41PMunchWould be handy to have as a guide
08:08:53PMunchIf you're doing some low-level stuff
08:09:07Araqlivcd, muhaha, he's under my influence
08:09:31leorizeif those are undocumented, then they might change in the future
08:09:43leorizeso using them as low-level stuff could be scary
08:10:05PMunchThat's true
08:10:17lqdev[m]well I'm not certain if that's exactly the way Nim generates code for variant types, but iirc someone here told me they are stored as a tagged union
08:11:55PMunch4leorize you can also do colours this way
08:12:25leorizebold
08:12:52leorizeI'm using weechat though, but there appears to be some key combo for these formatting
08:13:20PMunch2but 3with 4great 5power 6comes 7great 8responsibility 9so 10don't 11overuse 12the 13colours!
08:13:56narimiranPMunch: now i'll use that all the time
08:14:36Araqunderlined? 
08:14:38lqdev[m]ah crap, you almost made an IRC rainbow but failed :(
08:15:11livcdAraq: krux02 yeah i think he is kinda mimicking your german accent :D
08:15:41narimiranlivcd: where do you think krux02 is from? :D
08:16:09PMunchlqdev[m], almost?
08:16:43*Araq never even tried to get rid of his accent.
08:16:47livcdnarimiran: uhmm..sweden?
08:17:23narimiranlivcd: hehe, i think i thought that too in the beginning
08:17:26PMunchOn my home computer I have scripted a plug-in for HexChat that allows me to create a rainbow character by character of whatever I write :P
08:17:51narimiranPMunch: that must be very useful :P
08:17:51lqdev[m]PMunch: yeah almost, the colors were out of order in some places
08:17:53Araqit helps if people can quickly recognize you might not know what 'pancreatic' means
08:18:13livcdAraq: nothing wrong with accent :)
08:19:48Araqspeaking of which... why the heck is that a word? 'pancreatic'? who needed an adjective for *that*?!
08:21:13lqdev[m]English is weird sometimes
08:21:48lqdev[m]eg. 'iff', it's a word, but it's sort of unnecessary if you think about it
08:21:53PMunchlqdev[m], no they weren't. It's the colours 2-12
08:21:58PMunchErr 13
08:22:41PMunchnarimiran, did it mostly to see how writing plug-ins for HexChat worked
08:22:52PMunchBut it's been useful once or twice
08:23:07leorizeIRC colors depends on the color palette of the receiver
08:23:09TangerHaha, what context can 'pancreatic' be used in?
08:23:21lqdev[m]PMunch: I guess riot displays them incorrectly then? I see dark blue, dark green, red, brown, purple, orange, yellow, bright green, black, aqua, light blue, and magenta
08:23:25Tanger"His lunch left him in pancreatic distress"
08:23:35PMunchleorize, yes but there are a list of colours they are "supposed" to be
08:23:39PMunchSame for the terminal
08:23:51leorizematrix's palette is weird
08:24:06PMunchI have my green colour set to a blue one, works fine for most things, but a bit confusing in NetHack when trees are blue..
08:24:15lqdev[m]it's as standard as it can get, imo
08:24:53leorize0000ff as blue on matrix's freenode bridge afaict
08:26:45PMunchlqdev[m], this is what it looks like to me: uploads.peterme.net/hexchatcolours.png
08:27:44lqdev[m]it's not a rainbow nonetheless, a rainbow is generally red, orange, yellow, green, aqua, blue, purple, magenta
08:28:17PMunchAah, fair point
08:29:55leorizelooks like that's too much color for the 16-color palette of irc :p
08:30:25PMunch4So 7does 8this 9look 11like 2a 12better 6rainbow 13then?
08:30:30lqdev[m]not at all, you can remove the purple and it will work
08:30:46lqdev[m]ah yes, that's what I was talking about
08:42:48*neceve joined #nim
08:47:16*laaron joined #nim
08:49:17*laaron- quit (Ping timeout: 256 seconds)
08:52:02*laaron quit (Remote host closed the connection)
08:54:27*laaron joined #nim
09:09:09FromGitter<alehander42> i almost feel like krux02 might be german
09:09:27FromGitter<alehander42> PMunch why are you talking with numbers today
09:09:38FromGitter<alehander42> i always new norway-ish language is hard
09:09:43krux02I am German
09:10:02FromGitter<alehander42> i know :P
09:10:10FromGitter<alehander42> it shows even from this sentence
09:10:19PMunchalehander42, talking with numbers?
09:10:21FromGitter<alehander42> capitalizing pronouns
09:10:30FromGitter<alehander42> nouns*
09:10:44FromGitter<alehander42> PMunch "4So 7does " etc
09:10:52PMunchOh, you're not seeing the colours :P
09:10:55PMunchHaha
09:11:00lqdev[m]ah, I guess the gitter bridge bot translates colors into numbers
09:11:00FromGitter<alehander42> is this an irc thing
09:11:03krux02alehander42: you don't have an IRC client
09:11:04lqdev[m]yes
09:11:13lqdev[m]Matrix supports it
09:11:18krux02the numbers you see are probably the color codes that work in IRC but not over the bridge
09:11:32FromGitter<alehander42> i do irc half of the time with alexander92, but too lazy to login some days
09:11:36FromGitter<alehander42> ah ok
09:11:37PMunchlqdev[m], I think it just strips the control characters, but the colours are a control character and a number to select the colour
09:11:43PMunchSo it should really strip the number as well
09:11:49lqdev[m]hm
09:12:00krux02strip them or interpret them correctly
09:12:17lqdev[m]I don't think gitter supports colors
09:12:24lqdev[m]so, they should be stripped
09:12:32FromGitter<alehander42> we can generate bash snippet with colors maybe
09:13:12FromGitter<alehander42> ```\033[94mls\033[94m```
09:13:16FromGitter<alehander42> hm doubt it
09:13:23FromGitter<alehander42> it doesnt work like that
09:28:31*laaron quit (Remote host closed the connection)
09:33:18*laaron joined #nim
09:38:26*alexander92 joined #nim
09:56:47*Trustable quit (Remote host closed the connection)