<< 19-12-2014 >>

00:00:19*BlaXpirit quit (Quit: Quit Konversation)
00:01:36*mbenadda joined #nim
00:02:27*Matthias247 quit (Read error: Connection reset by peer)
00:04:33*Trustable quit (Remote host closed the connection)
00:04:57*boydgreenfield quit (Quit: boydgreenfield)
00:04:59ldleworkreactormonk: I have no idea which issue you're referring to
00:05:42*mbenadda quit (Ping timeout: 244 seconds)
00:08:17*Nimbus joined #nim
00:09:42*boydgreenfield joined #nim
00:09:49*boydgreenfield quit (Client Quit)
00:10:36*Nimbus quit (Remote host closed the connection)
00:13:12*Nimbus joined #nim
00:21:28*repax quit (Quit: repax)
00:26:09*Nimbus quit (Remote host closed the connection)
00:28:04*Nimbus joined #nim
00:28:37*starless joined #nim
00:29:45*Nimbus quit (Remote host closed the connection)
00:30:00*Nimbus joined #nim
00:30:38*Nimbus quit (Remote host closed the connection)
00:30:47*Nimbus joined #nim
00:30:58*Varriount|Mobile joined #nim
00:32:18*Nimbus quit (Remote host closed the connection)
00:32:27*Nimbus joined #nim
00:34:50Varriount|MobileHi Nimbus
00:35:30EXetoCNimbus: yo, bot!
00:35:48flaviu,eval echo "hi Varrount"
00:35:50Nimbusflaviu: hi Varrount
00:36:04flaviudts's bot
00:36:31ldleworkit supports multiline?
00:36:36flaviuin a few moments
00:36:57*Nimbus quit (Remote host closed the connection)
00:37:08*Nimbus joined #nim
00:38:10*Nimbus quit (Remote host closed the connection)
00:38:20*Nimbus joined #nim
00:39:15*willwillson quit (Read error: Connection reset by peer)
00:39:42*Nimbus quit (Remote host closed the connection)
00:39:52*Nimbus joined #nim
00:40:19*Nimbus quit (Remote host closed the connection)
00:40:28*Nimbus joined #nim
00:42:28*Nimbus quit (Remote host closed the connection)
00:42:37*Nimbus joined #nim
00:43:31*Nimbus quit (Remote host closed the connection)
00:43:40*Nimbus joined #nim
00:46:19*Nimbus quit (Remote host closed the connection)
00:46:28*Nimbus joined #nim
00:47:33*Nimbus quit (Remote host closed the connection)
00:47:42*Nimbus joined #nim
00:48:51*Nimbus quit (Remote host closed the connection)
00:48:59*Nimbus joined #nim
00:49:04*Nimbus quit (Remote host closed the connection)
00:49:28*Nimbus joined #nim
00:49:54*Nimbus quit (Remote host closed the connection)
00:50:03*Nimbus joined #nim
00:50:27*sir_dts joined #nim
00:53:47*Nimbus quit (Remote host closed the connection)
00:53:57*Nimbus joined #nim
00:54:01Varriount|Mobile?
00:54:46flaviuldlework: ping
00:54:49Varriount|Mobile,eval echo(2+3)
00:54:50NimbusVarriount|Mobile: 5
00:55:03flaviuit supports multiline
00:55:03flaviu,eval import os ⏎echo("test" / "foo")
00:55:05Nimbusflaviu: test/foo
00:55:17*nimnoob quit (Ping timeout: 240 seconds)
00:55:45ldleworkpong
00:55:47ldleworkflaviu:
00:55:50ldleworkoh
00:55:51ldleworkcool
00:56:22ldleworkflaviu: would you like to try the tech demo that will underlie my game?
00:56:39Varriount|Mobileflaviu: how does the bot detect newlines?
00:57:16flaviuVarriount|Mobile: Unicode! ⏎
00:57:20flaviuldlework: sure
00:57:51Varriount|Mobileflaviu: Huh?
00:58:04flaviu`⏎` means newline
00:58:22EXetoChow do I enter that on linux?
00:58:30flaviucopy paste :P
00:58:30Varriount|MobileNice, but I can't type that on my phone.
00:59:18*Nimbus quit (Remote host closed the connection)
00:59:28*Nimbus joined #nim
00:59:35Varriount|Mobileflaviu: what about an 'eval-start' and 'eval-end' commands?
00:59:49flaviuDammit Varriount. Ok, just for you, 4c277a1773237fd5c8d333fedb4262238789c95b91bf2de7adc3db7175d374ad can also be used for newlines
00:59:52*rpag quit (Ping timeout: 245 seconds)
00:59:59flaviuI think that can be typed on phones
01:00:16flaviu,eval echo "a"4c277a1773237fd5c8d333fedb4262238789c95b91bf2de7adc3db7175d374adecho "b"
01:00:18Nimbusflaviu: a
01:00:21EXetoCuse something like «?
01:00:37EXetoCand then about 10 other common unicode characters
01:00:43ldleworkflaviu: EXetoC https://github.com/dustinlacewell/nix
01:00:50flaviu,eval echo("a" &4c277a1773237fd5c8d333fedb4262238789c95b91bf2de7adc3db7175d374ad "b")
01:00:51Nimbusflaviu: ab
01:00:51ldleworkjust nim c -r src/qix.nim
01:01:13*sir_dts quit (Ping timeout: 246 seconds)
01:01:29flaviuVarriount|Mobile: That's probably the best solution, I'll send it to dts|pokeball.
01:01:43ldleworkflaviu: EXetoC to use it, hit shift and cut into the poly gon
01:02:06ldleworkflaviu: EXetoC you should be able to make arbitrary cuts in any orientation from any edge or corner to any edge or corner, including the same one
01:02:37flaviu"undeclared identifier: 'drawStipple'"
01:02:37flaviuWhat are it's dependencies?
01:02:42ldleworkoh
01:02:53ldleworkI patched SDL_gfx to implement a stippled line
01:02:54ldleworklol
01:03:19ldleworkI guess I should submit a PR for that...
01:03:44flaviucan you just gist the patch?
01:03:53ldleworkflaviu: change line 164 in diamond.nim to use just drawLine
01:03:55ldleworkor that
01:03:57ldleworksure
01:04:22*Var|Mobile joined #nim
01:05:30ldleworkflaviu: https://gist.github.com/dustinlacewell/a3a66cc6da67c6894b96
01:05:34ldleworkit was a patch to graphics.nim
01:05:38ldleworknot sdl_gfx
01:06:42ldleworkI'm going to generalize it
01:06:47ldleworkby adding a period parameter
01:06:52ldleworkthat defaults to 1 for solid line
01:07:30EXetoCno lines representing the output appears
01:07:41flaviuYeah, I doesn't do anything for me either
01:07:44*Varriount|Mobile quit (Ping timeout: 245 seconds)
01:08:02ldleworkwhat
01:08:04EXetoCthere's only a red dot top-center
01:08:08ldleworkhold shift
01:08:09EXetoC+in
01:08:10ldleworkand press down
01:08:13ldleworkinto the square
01:08:15Araqnot that I really care ... but how exactly is typing "ref T" everywhere not code monkey work?
01:08:21flaviuoh, arrow keys
01:08:39ldleworkAraq: comapred to creating a superflous type for every type in your program?
01:08:53EXetoCthere we go
01:09:06Araqand who thinks you need to do that?
01:09:12AraqFoo = ref object ...
01:09:16AraqBar = object ...
01:09:24Araqthere we go, no thinking involved
01:09:36ldleworkfor every single type
01:09:55EXetoCI don't the overhead is that big
01:09:57ldleworkjust so you can be less sure whether some name is a reference or value
01:10:00Araqread what I wrote
01:10:04ldleworkAraq: I did
01:10:33ldleworkAraq: what if you want a Foo on the stack?
01:10:38ldleworkor a Bar on the heap
01:10:52ldleworkWhat if I want to know at a glance what kind of types they are
01:10:59flaviuI'm not sure what I'm supposed to be doing, but I turned most the grid red.
01:11:07ldleworkflaviu: that's all that you can do right now
01:11:17ldleworkthe point is that you can cut up that square anyway you want and it is stable
01:11:23Araqldlework: then you move your mouse cursor over the type, dude
01:11:31EXetoCI told you about the convention, but it needs to be documented
01:11:41ldleworkEXetoC: that convention is terrible
01:11:59Araqthe convention IS documented
01:12:05EXetoCok sorry
01:12:09ldleworkJust because I'm looking at a Foo, it doesn't tell me whether there is some other FooObj, or some other FooRef
01:12:15ldleworkIt doesn't help - at all
01:12:28Araqso? we got rid of the ugly T/P
01:12:38ldleworkAraq: he's talking about Ref and Obj postfixes
01:12:48ldleworkin response to not knowing what whether a type is a ref or not
01:12:57ldleworkThe convention doesn't help that problem at all
01:13:09Araqyes, the new convention doesn't
01:13:12*Nimbus quit (Remote host closed the connection)
01:13:14Araqthe old convention did
01:13:24ldleworkI'll stick with ref, thanks
01:13:44Araqthat's ridiculous too
01:13:44*Var|Mobile quit (Read error: Connection reset by peer)
01:13:55Araqref Foo, ref Foo, ref Foo, ref Foo
01:14:02ldleworkits one space
01:14:03ldleworkOOOOOO
01:14:16Araqit basically a way of telling your readers they are idiots
01:14:17ldleworkvisually distinct and explicit
01:14:27ldleworkAraq: do you think that argument would move me
01:14:29ldleworklike
01:14:33ldleworkdo you think that's a strong objective argument
01:14:34Araqbecause they can't remember anything
01:14:40ldleworkare you just being a dick at this point?
01:14:41Araqyes, it is
01:14:44Araqbecause
01:14:47Araqyou
01:14:53Araqas every other programmer out there
01:15:04Araqtotally ignores usage statistics
01:15:09Araqand stick to petty rules instead
01:15:16ldleworkSometimes I'm reading source code for the first time
01:15:21Araqwhich make sense when you never ever look at the result
01:15:27ldleworkand type aliases because your ref keyword sucks -is a petty rule-
01:15:44ldleworkAraq: you should go take a walk
01:16:04flaviuldlework: How about everyone goes and takes a walk?
01:16:56*kmcguire quit (Ping timeout: 265 seconds)
01:17:00flaviuBoth of you won't ever agree, so might as well drop it.
01:18:00ldleworkIts fine to disagree
01:18:17EXetoCI did think about this before, but I can't say whether or not it's a problem that it's not obvious by looking at the code what the primary type is
01:18:47ldleworkEXetoC: better be more implicit, since we're not sure
01:18:48EXetoCI know it won't be the end of the world, but I'll have to figure whether or not it'll bother me at all.
01:18:59flaviuYes, but it's not fine for anyone to be rude in an argument, and this is religious war territory.
01:30:05Araqactually, it isn't. Either you stick to our style guidelines or you don't. Kind of ironic how everybody thinks style guidelines are important and yet nobody wants to follow them.
01:31:27AraqI personally think style guidelines are the most effective way to burn lots of money and not much more.
01:39:10ldleworkIts a brand new language who's syntax is still changing here and there. Putting so much weight behind a style guide that has obviously had to fundamentally change due to T/P prefix removal is a bit vacous.
01:39:32Araqwe discussed this topic for ages
01:39:36ldleworkConsider me to be exploring whether type aliases are actually needed - at all
01:39:54ldleworkOr whether they save a few keystrokes for less explicitness
01:40:08Araqand just fyi, C# doesn't distinguish between 'struct' and 'class' via type names either
01:40:11ldleworkI'll let you know whether my users are insulted
01:40:43Araqwell I'll tell you I'm insulted
01:40:51Araqbut ofc I don't count
01:41:01ldleworkBut they do distinguish between value and reference types
01:41:11ldleworkwhich is actually what is being discussed
01:41:29AraqC#'s DateTime -- struct or class?
01:41:47ldleworkI know that it isn't a *REFERENCE TYPE8
01:42:02AraqC# distinguishes it a bit differently from Nim, but the problem is exactly the same
01:42:05*starless quit (Quit: WeeChat 0.4.2)
01:42:14ldleworkIt isn't.
01:42:19Araqlol?
01:42:29Araqso where is the difference?
01:42:40ldleworkThe difference between a struct and and class isn't the same as whether you are dealing with a reference to either or not.
01:44:01Araq'ref object' ~= class
01:44:08Araq'object' ~= struct
01:44:17ldleworkyeah, not at all
01:44:27ldleworkI can take a ref to both in C#
01:44:30ldleworkthat's the issue we're dealing with
01:44:38ldleworkI don't know why you're trying to conflate a completely unrelated issue
01:44:54Araqdo you actually know C#?
01:45:52ldleworkYeah, and I'm fairly certain you can take a pointer to either a struct or a class.
01:46:12ldleworkinstance, that is
01:46:27ldlework int i = 5;
01:46:29ldlework int* j = &i;
01:46:51ldleworkDo you?
01:47:02AraqI know it really well.
01:47:17Araqand I have no idea how you cannot agree with me
01:47:38ldleworkuh because "ref object" ~= class and "object" ~= struct, is patently wrong?
01:47:43ldleworkbecause C# has actual references to either?
01:47:52ldleworkyou're dodging reality and conflating unrelated issues?
01:47:56ldleworkare those enough reasons?
01:48:10Araqthese are reasons for sure, but they are all wrong.
01:48:15ldleworkDemonstrate.
01:48:20Araqtype Foo = ref object
01:48:29Araqsame semantics (roughly) as:
01:48:36Araqclass Foo { ... }
01:48:43Araqtype Bar = object
01:48:49Araq--> struct Bar {...}
01:48:55ldleworkSo you've reiterated your conflated equivalency
01:49:06ldleworkbe surprised I'm not moved the second time either
01:49:46ldleworkwhether a name is a class or struct --is in no way in any possible interpretation-- the same problem of whether you have a pointer or a value
01:50:14*mbenadda joined #nim
01:50:16ldleworkclasses are not pointers, except perhaps from an internal implementation standpoint
01:50:16Araqit is EXACTLY the same problem
01:50:19ldleworkAraq: okay
01:50:21ldleworkso
01:50:34ldleworknevermind actually this is useless
01:51:26ldleworkAraq: is i above a reference or a pointer?
01:51:34ldleworkAraq: is j a reference or a pointer?
01:51:42ldleworkHow do you know the answer to either of those questions?
01:51:53ldleworkHOW DOES THE ANSWER HAVE ANYTHING TO DO WITH WHETHER THE UNDERLYING TYPE IS A CLASS OR STRUCT
01:51:58ldleworkffs
01:52:07ldleworkI call this "Arguing dishonestly"
01:52:10ldleworkyou're not lying
01:52:15flaviuldlework: Relax, somehow you're being more rude than Araq.
01:52:18ldleworkbut you're completing ridiculously
01:52:41ldleworkflaviu: really I haven't insulted his basic competence
01:54:10Araqwell I don't know what to say. You think there are differences when there are none.
01:54:24*mbenadda quit (Ping timeout: 245 seconds)
01:54:40ldleworkAraq: I've demonstrated that there are
01:55:02Araq'int* j = &i;' is like: 'var j: ptr int = addr(i)'
01:55:06ldleworkanyone who isn't in this wierd place where they feel stuck to defend a ridiculous untennable position can see the distinction
01:55:33Araqon the contrary everybody who knows a tiny bit of formal semantics knows that I'm right.
01:55:47ldleworkwhy can't you answer my basic questions then?
01:55:52ldleworkyou didn't answer my question
01:55:58ldleworkand simply provided another odd code metaphor
01:56:15ldleworkhow do you know i is a reference or value
01:56:16AraqI didn't notice there were any serious questions asked
01:56:21ldleworkhow do you know that j is a reference of value
01:56:30ldleworkWhat informs you to those answers?
01:56:46ldleworkand how is the thing that informs those answers, related to whether the underlying type is a class or struct?
01:57:04ldleworkif the thing that informs you has nothing to do with whether the underlying type is a class or struct
01:57:08ldleworkhow do you justify your position?
01:57:13ldleworkanswer each question in order
01:59:07Araqj is a pointer because of the *
01:59:27ldleworkso we know that j is a pointer because of something that has nothing at all to do with its underlying type
01:59:33Araqbut again, DateTime could be a struct or a class
01:59:43Araqand it matters quite a bit
01:59:46ldleworkso in C#, whether a name is a reference, or a value has nothing to do with whether its underlying type is a class or struct
01:59:58ldleworkbecause in C#, references are not types
02:00:03Araqer no? classes are reference types
02:00:09Araqstructs are value types
02:00:20ldleworkfrom the underlying implementation standpoint you are correct
02:00:32ldleworkbut a user of the language cannot 'dereference' a class
02:00:45ldleworka user of the language doesn't care how to obtain the 'value' of a class instance by dereferencing it
02:01:05ldleworkthat a user has a value, an instance of a class, matters 0% for reference vs values semantics
02:01:54ldleworkIn C# the only thing that matters, that has anything to do with the issue in Nim about type names, is between values of struct AND classes, and POINTERS to those value types
02:02:06Araqso your point is that Nim still has this deref operation?
02:02:23ldleworkAraq: no, that references are literally types in Nim
02:02:26ldleworkand so it matters
02:02:29ldleworkgiven any variable name
02:02:38ldleworkwhether the underlying type is implemented as a reference or value
02:02:43ldleworkin the sense of pointer or value
02:02:57ldleworknot in the sense of "Oh C# classes are implemented underneat as references."
02:03:02Araqit matters in C# too. = either copies, or it doesn't.
02:03:08ldleworkright
02:03:10ldleworkbut in C#
02:03:17ldleworkyou don't go to the underlying type of the value
02:03:22ldleworkyou either have a reference or a value
02:03:30Araqyes well
02:03:35ldleworkin C# you don't look to see whether int is a reference or value type
02:03:40Araqthat is actually what the guidelines propose
02:03:41ldleworkthe name of the type is irrelevant in C#
02:03:52ldleworkin C# * and & tell you
02:03:52Araqand what dom96 tried to explain to you.
02:03:54ldleworkjust like
02:03:56ldleworkin nim
02:03:58ldleworkhow ref tells you
02:04:03ldleworkas long as you only define value types
02:04:05ldleworkTADA
02:04:07ldleworkexactly my style
02:04:19*ldlework goes home
02:05:03Araqit still makes no sense tbh
02:05:51Araq'ref' is not used like *, 'ref object' is used like 'class'
02:05:55ldleworkno
02:06:02ldleworkref is used like &
02:06:08ldleworkI know its true
02:06:15ldleworkbecause I write Nim code under this assumption
02:06:18ldleworkand surprise surprise
02:06:21ldleworkmy programs compile
02:06:33Araq& is addr
02:06:44ldleworkholy shit
02:06:46AraqC++'s & is Nim's 'var'
02:06:59ldleworkAraq: you don't actually care to understand
02:07:01ldleworkjust reiterate
02:07:02AraqC#'s * is Nim's 'ptr'
02:07:38ldleworkAraq: I don't use ptr's in Nim
02:07:38Araqhow can you say "ref is used like &" when one is a type constructor and the other an operator?
02:07:48ldleworkso for me, there are only values and refs
02:07:53ldleworkin which case
02:08:02ldleworkref acts exactly like the "get a reference to this value" operator in C#
02:08:13Araqno
02:08:17Araqnot at all.
02:08:27ldleworkI must just be incredibly lucky with the compiler then
02:08:37ldleworkOr your making a point that has no bearing on the actual writing of code
02:08:46Araqlisten
02:08:57Araq&i is a *value*
02:09:04Araq'ref int' is a *type*
02:09:13ldleworkI understand that dude
02:09:14flaviuldlework: I'm Araq isn't deliberately failing to understand as I don't understand what you're saying either. Can you post code doing what you describe?
02:09:22ldleworkI've already mentioned that in Nim references are types
02:09:26ldleworkthat I understand this distinction
02:09:42ldleworkflaviu: its easy
02:09:49ldleworkI define ALL my types as non-ref types
02:09:53ldleworkthen when I want a reference
02:09:57ldleworkI use "ref T"
02:10:01ldleworkit isn't that hard to understand
02:10:16Araqyes, that part is perfectly clear
02:10:17ldleworkjust like in C# when you want to store a reference, you do int*
02:10:27ldleworkthe type is defined as a reference
02:10:35ldleworkit just so happens that we don't need & in Nim
02:10:38Araqbut you cannot get this 'ref' from T at all. you have to 'new' it.
02:10:57ldleworkthat's correct, ref is not actually an operator in Nim
02:12:01ldleworkI don't use ref to get references to things on the stack
02:12:09Araqok, I need to sleep but:
02:12:09*brson quit (Ping timeout: 272 seconds)
02:12:10ldleworkI use ref to explicitly mark that I'm working with reference types
02:12:13*z1y joined #nim
02:12:26Araq1. I know what you do.
02:12:54Araq2. The style guide suggests to treat 'ref object' and 'object' like 'class' and 'struct' in C#.
02:15:15Araq3. It is dishonest to complain about the problem that you cannot tell 'ref object' from 'object' and *at the same time* that C# doesn't have the same problem.
02:15:32AraqGood night.
02:16:33ldleworkI know when I'm creating a reference or a value in C# because of * and &, and I know need to look at the definition of the type - ever in any context in C#
02:16:48ldleworkand I don't need*
02:17:38ldleworkIn Nim, you have the problem in that var f = newFoo(), may result in a refrence or value
02:19:16flaviuldlework: Is there something you can do with a reference that you can't with a value or the other way around?
02:19:19*z1y left #nim (#nim)
02:19:53flaviuref T and var T are pretty much the same thing.
02:20:10*brson joined #nim
02:20:55*kniteli quit (Ping timeout: 250 seconds)
02:22:12j3rkyi don't mean to interrupt the argument, but it looks like Araq went to sleep now. would someone be willing to help an idiot? i can't get Aporia to build. i'm on a fresh ArchLinux install, built nim from GitHub, followed the readme and installed all dependencies, but "glib2 cannot be opened" in aporia.nim. maybe my PATH is not set up right?
02:23:14flaviuj3rky: You have nothing to apologize about. Just to make sure, you have glib2 installed?
02:23:27j3rkyyep, pacman says it's installed
02:23:31*kniteli joined #nim
02:23:42ldleworkflaviu, ....
02:25:29flaviuj3rky: I can reproduce it, give me a few moments to figure it out.
02:25:40j3rkyok thanks
02:26:53ldleworkflaviu: passing a ref or var to an impure function is pretty important distinction
02:27:28EXetoCldlework: you don't know about the newFoo/initFoo distinction then
02:27:28ldleworkif I pass some vars around to an impure function that modifies fields in order to do some calculations, then those functions don't mutate the data
02:27:51ldleworkEXetoC: so now how I have to define multiple constructors to avoid the ref keyword too?!
02:28:45EXetoCldlework: few people have actually needed to define both
02:28:58EXetoCbut there are planned features that are relevant to this
02:29:09ldleworkI like when I delve into some code, and I see ref anywhere I know the consequences of impure functions
02:29:11ldleworkIs that ok?
02:29:19EXetoCwhich I've brought up once or twice today already
02:29:58ldleworkref aliases give nothing of value
02:30:06ldleworkIts like asking "Why don't you believe in God?
02:30:13ldleworkThere is literally *no* reason to do so.
02:30:41ldleworkNothing motivates it. Except that we've arbitrarily decided that it is a good idea.
02:31:06ldleworkAnd henceforth planned features, extra functions and so on to work around the consequences of that decision.
02:31:07flaviuldlework: You should keep religion out of this, it won't lead anywhere productive.
02:31:13ldleworkI'll just use 'ref'.
02:31:25EXetoCthat's not what you were talking about just then though, and neither was I
02:31:41flaviuj3rky: Well, running `nimble install gtk2` seems to postpone the error a bit
02:32:00ldleworkI mean
02:32:04ldleworkwhy not remove the ref keyword
02:32:09ldleworkand replace 'ref object'
02:32:11ldleworkwith 'reference'
02:32:23ldleworkif it is not used anywhere else
02:37:41EXetoCif you're referring to the conventions, then you might still have situations where the ref type is not the primary one, so you need to do "FooRef = ref Foo"
02:38:24EXetoCand it's difficult to remove a keyword just like that, though we still are at <1.0, but it needs to justified either way
02:39:42j3rkyflaviu: postpone as in it will still break later, or as in it will build Aporia successfully? :)
02:39:53flaviuj3rky: I'm not sure, perhaps you could message dom96 tomorrow. `s/(func/(funcc/` and `s/ func/ funcc/` for `~/.nimble/pkgs/gtk2-1.0/gtk2.nim` fixes most problems, but I then get a weird error message that I don't understand
02:40:03flaviuIt will fail to build, but later in the process.
02:40:12j3rkyi see
02:40:31j3rkyok, i will message dom96 tomorrow. thank you so much for looking into it!
02:40:45flaviuNo problem, happy to help.
02:41:00j3rkywhat other IDEs / text editors do people here use for programming in nim?
02:41:54j3rkyfrom what i understand, only Aporia offers auto completion to some extent right now, is that correct?
02:42:39*brson_ joined #nim
02:42:46*brson_ quit (Client Quit)
02:43:04*brson quit (Read error: Connection reset by peer)
02:43:10*brson joined #nim
02:43:41flaviuYes, although other text editors do offer dumb auto completion. Sublime text is good.
02:47:23*brson quit (Client Quit)
02:47:39*brson joined #nim
02:52:35*darkf joined #nim
02:54:28*z1y joined #nim
02:56:32*flaviu quit (Ping timeout: 250 seconds)
02:57:38*Jesin joined #nim
03:02:31*brson quit (Ping timeout: 250 seconds)
03:03:26*darkf quit (Ping timeout: 258 seconds)
03:09:10fowlfunc keyword is probably used in every wrapper
03:10:00fowlit was in a lot of mine
03:12:34*nimnoob joined #nim
03:15:13*darkf joined #nim
03:15:13*darkf quit (Changing host)
03:15:14*darkf joined #nim
03:15:44*nimnoob quit (Remote host closed the connection)
03:19:25Varriount_Araq: Um, I think you need to update github's commit hook, so the buildbots know when to build
03:24:28EXetoCso does anyone know of any capable C parsers? otherwise I'll just see if pycparser is anything to write home about
03:25:10Varriount_EXetoC: What kind of parser are you talking about?
03:25:19Varriount_Oh, wait, C parsers.
03:25:31Varriount_I thought you had meant parsers written in C.
03:25:57fowlEXetoC, something from clang probably
03:26:00Varriount_EXetoC: Well, wouldn't Clang and GCC have C parsers?
03:26:09*Varriount_ is now known as Varriount
03:28:26EXetoCright..
03:33:18*nimnoob joined #nim
03:39:02*mbenadda joined #nim
03:43:20*mbenadda quit (Ping timeout: 250 seconds)
03:58:01*dain_ quit (Quit: dain_)
04:02:38*brson joined #nim
04:09:17*kapil__ joined #nim
04:19:27*z1y quit (Ping timeout: 272 seconds)
04:22:49*z1y joined #nim
04:27:48*nimnoob_ joined #nim
04:27:48*nimnoob quit (Read error: Connection reset by peer)
04:28:07*nimnoob_ quit (Client Quit)
04:28:54*nimnoob joined #nim
04:59:06*nimnoob quit (Quit: Leaving)
05:00:49*gmpreussner joined #nim
05:01:30*j3rky quit (Ping timeout: 258 seconds)
05:27:46*mbenadda joined #nim
05:32:14*mbenadda quit (Ping timeout: 244 seconds)
05:39:46*kniteli quit (Read error: Connection reset by peer)
05:41:38*ARCADIVS joined #nim
05:56:59*kniteli joined #nim
06:03:45*Jesin quit (Quit: Leaving)
06:15:04gmpreussnerif i declare a type with "type Foo = distinct array[0..123]", how can i "borrow" the [] notation, so that i can still access array elements, i.e "myFooValue[42]"?
06:26:57*z1y quit (Remote host closed the connection)
06:28:03*z1y joined #nim
06:29:07*gmpreussner is now known as j3rky|zzZzz
06:34:55*yglukhov_ quit (Quit: Be back later ...)
06:35:30*dyu joined #nim
06:41:28*yglukhov_ joined #nim
06:42:59*yglukhov__ joined #nim
06:42:59*yglukhov_ quit (Read error: Connection reset by peer)
06:47:32*yglukhov__ quit (Ping timeout: 265 seconds)
06:56:35*yglukhov__ joined #nim
06:56:43*j3rky|zzZzz quit (Ping timeout: 265 seconds)
06:59:19*yglukhov__ quit (Read error: Connection reset by peer)
06:59:48*yglukhov__ joined #nim
07:00:19*brson quit (Ping timeout: 272 seconds)
07:04:24*yglukhov__ quit (Ping timeout: 250 seconds)
07:08:14*gour joined #nim
07:08:32*perturbation joined #nim
07:09:54*gour quit (Client Quit)
07:11:28*kapil__ quit (Quit: Connection closed for inactivity)
07:14:48dts|pokeballback
07:15:04dts|pokeballyeah Varriount i was thinking of doing something like that
07:16:02*gour joined #nim
07:16:33*mbenadda joined #nim
07:20:44*mbenadda quit (Ping timeout: 244 seconds)
07:31:00*boydgreenfield joined #nim
07:33:48*perturbation quit (Quit: Leaving)
07:41:33*kapil__ joined #nim
07:50:07*boydgreenfield quit (Quit: boydgreenfield)
08:12:56*BlaXpirit joined #nim
08:13:56*BlaXpirit quit (Client Quit)
08:17:16*mbenadda joined #nim
08:19:11*yglukhov__ joined #nim
08:21:47*mbenadda quit (Ping timeout: 265 seconds)
08:42:59*mbenadda joined #nim
08:45:48*khmm joined #nim
08:48:58z1ydo we have any book on #nim? or any .pdf resource? I'd like to print and read on papers...
08:52:38z1ycurl -Lo- http://nim-lang.org/gc.html | sed -e 's#It it not #It is not#'
09:04:10*khmm quit (Ping timeout: 255 seconds)
09:08:50*khmm joined #nim
09:16:40*ARCADIVS quit (Quit: ARCADIVS)
09:25:24*Trustable joined #nim
10:17:26*kniteli quit (Ping timeout: 244 seconds)
10:25:59Araqz1y: you can generate a PDF from the manual
10:26:14Araqlet me push some patch so that "koch pdf" works
10:26:53z1yThanks Araq. I will try
11:03:13*khmm quit (Ping timeout: 265 seconds)
11:04:22*khmm joined #nim
11:15:47*z1y quit (Ping timeout: 265 seconds)
11:28:11*repax joined #nim
11:41:04dyuAraq: I tried to run the lib tests via koch test c lib... then I modify it and add something in whenIsMainModule, it doesn't get picked up on next run?
11:41:56*Jesin joined #nim
11:42:05dyuI had a patch on strutils I wanted to test before doing a PR
11:42:36*flaviu joined #nim
11:55:05*flaviu quit (Ping timeout: 244 seconds)
11:56:30Araqdyu: hrm well 'lib' is special
11:56:50Araqmaybe run 'stdlib' instead
12:00:17dyuAraq: ok, so I'll move the tests to tstrutil.nim ... is there a shortcut to running one test file?
12:00:36Araqnim c -r tests/foo/tfoo.nim
12:01:25dyuok
12:01:26dyuthanks
12:01:42Araqmaybe the tester also supports that
12:01:48Araqbut I never run a single test
12:02:05AraqI run full categories. always.
12:02:14dyutakes a while
12:02:34*dyu not using ssd
12:02:45Araqwell that depends on the category
12:03:01*kmcguire joined #nim
12:03:03Araqdom96: I will also write a forum entry about this but
12:03:12AraqI found your future.nim tests
12:03:17Araqand noticed something
12:03:24*xcombelle joined #nim
12:04:04AraqnoReturn(() -> void => echo("noReturn"))
12:04:09AraqNow needs to be:
12:04:16AraqnoReturn((() -> void) => echo("noReturn"))
12:04:28dom96where are the tests?
12:04:30Araqbecause I made arraw like operators right associative
12:04:40Araqclosures/tclosuremacro.nim
12:04:49AraqI moved it to 'macros' btw
12:05:03Araqas it tests macros moreso than closures
12:05:17dom96ok
12:05:36Araqbtw I also fixed your macro :P
12:05:54Araqbut the question is: should arrows really be right assoc?
12:06:10Araqit's the right thing to do for int->int->int
12:06:21Araqbut not for a->b => a+b
12:06:56*EXetoC quit (Read error: No route to host)
12:07:30*EXetoC joined #nim
12:12:53dyuAraq: did the PR ... btw, the files in tests/stdlib seems to have a different line separator than in lib/pure
12:13:27dyuI had to use vi to edit tstrutils.nim, to not mess up the diff
12:13:42Araqpoor lad
12:13:52dyuhehe
12:14:00dyuwhy is it different though
12:14:13Araqbecause I use tools which don't give a fuck
12:14:33Araqtools that came after the invention of sliced bread
12:15:46dyuAraq: you open to reformatting test/* with same formatting as lib/*?
12:16:02*jasondotstar is now known as jasondotstar|afk
12:17:31*BlaXpirit joined #nim
12:17:38Araqit it means I also get useful PRs from you.
12:17:42Araq*IF
12:18:01dyuwell its for consistency first and foremost
12:18:03dyu:P
12:20:13Araqconsistency with 1960?
12:21:45*dyu doesn't get it
12:23:05AraqI don't want to discuss this again
12:28:50EXetoCdyu: your editor converts all the newlines? otherwise I don't know what the problem is
12:29:32dyuEXetoC: yep (gedit)
12:30:08dyutheres probably a switch to turn in off
12:30:56Araquse aporia instead. it's like gedit. but with an acceptable search&replace.
12:31:25dyuI used aporia before, doesn't compile anymore on my ubuntu laptop
12:32:05Araqfix it please
12:35:43dom96Araq: Using -> and => shouldn't be necessary often, especially if you improve type inference.
12:36:13Araqdom96: well I fixed 'auto'. I think.
12:36:19Araqneed to test that again
12:36:41Araqotherwise type inference is as good as it'll get, I'm afraid
12:39:02*noam joined #nim
12:40:20EXetoCdom96: why not? aren't they shortcuts?
12:45:56*clone1018_ joined #nim
12:46:28*Triplefox quit (Ping timeout: 255 seconds)
12:46:54AraqEXetoC: he means using both at the same time as in the example I gave
12:47:35*Triplefox joined #nim
12:52:34Araqdyu: thanks for your PR but as usual, I can see the trouble
12:52:56Araq1. Is the 'r' prefix what we want for 'reversed'?
12:53:46Araq2. It's only a version for 'char'. Will annoy people too.
13:03:03EXetoCI think 'r' will be obvious to many
13:05:00Araqwhat does Ruby use for this?
13:05:21Araqeverything else is obviously wrong anyway
13:05:59yglukhov__The char version of rfind is actually consistent with existing string version =)
13:09:10dyuyglukhov__: right on
13:09:18Araqah Ruby uses the 'r' prefix too. so it's all good. Now I want to sleep with it, it's so sexy.
13:10:21EXetoC>.>
13:10:22dyuAraq: didn't you write rfind for the string arg?
13:11:12Araqno? does that exist already? o.O
13:11:21dyuyep
13:11:27dyuI simply ran with it
13:11:35Araqoh ok lol.
13:15:16Araqguys, who will make the PR for this: https://github.com/Araq/Nimrod/issues/1747
13:15:55Araqimproving the CSS is acceptable, rewriting it in Ruby-DSL-for-fixing-CSS-of-the-week is not.
13:20:31EXetoCAraq: I don't know which example you gave, but in what ways won't inference be improved? I recall having to annotate at least the return type for lambdas
13:21:03EXetoCnot having to would be nice of course, but the lambda syntax on its own is already a nice shortcut
13:21:45EXetoCoooo, live comment updates on github. hi-tech
13:26:39*xcombelle quit (Ping timeout: 272 seconds)
13:30:47dom96Araq: I'm assuming you don't actually want that yellow background?
13:33:36Araqwell I do. but i can imagine nobody else.
13:35:40dom96Yeah... Please no.
13:41:28*kapil__ quit (Quit: Connection closed for inactivity)
13:43:14Araqping Varriount
13:46:13EXetoCI think the background transition looks odd in any case, but not many people seem to have much negative to say about the overall design
13:56:32*kapil__ joined #nim
13:59:19*nickles joined #nim
14:07:01*BitPuffin joined #nim
14:07:17nicklesWhere did nimbuild go?
14:15:31Araqit's disabled because I switched servers
14:15:40Araqand maybe will be revived
14:24:39nicklesthx
14:27:19*nickles left #nim (#nim)
14:29:46*willwillson joined #nim
14:31:25willwillsonEXetoC: would libclang suffice for your c parsing needs? https://github.com/cowboy-coders/nim-libclang
14:34:18AraqEXetoC: either use clang or c2nim ;-)
14:41:57EXetoCwillwillson: great
14:47:46EXetoCAraq: people want more automatic tools obviously, so I thought I'd look into using a full-fledged parser
14:47:52EXetoCbut c2nim does an alright job as you say
14:48:11EXetoCand now I have about 101 things in the pipeline
14:48:26Araqwell a full-fledged parser also has its disadvantages
14:55:57EXetoCok
14:57:16*xcombelle joined #nim
15:16:22*jasondotstar|afk quit (Ping timeout: 256 seconds)
15:24:29*jasondotstar|afk joined #nim
15:37:31*darkf quit (Quit: Leaving)
15:41:23*jasondotstar|afk quit (Ping timeout: 244 seconds)
15:57:35*z1y joined #nim
16:00:39*jasondotstar joined #nim
16:01:28*kapil__ quit (Quit: Connection closed for inactivity)
16:01:32*xcombelle quit (Ping timeout: 244 seconds)
16:27:13*askatasuna joined #nim
16:28:22*saml_ joined #nim
16:34:41*khmm quit (Ping timeout: 264 seconds)
16:37:47*z1y quit (Ping timeout: 245 seconds)
16:47:35*kmcguire quit (Ping timeout: 250 seconds)
16:48:11*Matthias247 joined #nim
16:49:41*kmcguire joined #nim
16:50:42*askatasuna quit (Ping timeout: 250 seconds)
16:53:29*willwillson quit (Remote host closed the connection)
16:55:57*BlaXpirit-UA joined #nim
16:58:37*BlaXpirit quit (Ping timeout: 245 seconds)
17:04:03*shevy joined #nim
17:04:09shevyyou finally did it!
17:04:20shevylong live nim
17:04:22shevydown with nimrod!
17:12:53*Trustable quit (Remote host closed the connection)
17:24:47*StefanSalewski joined #nim
17:26:27StefanSalewskiRemark: Seems when we click on online-irc from bottom of main page, we get invalid #nim-lang channel. Valid #nim channel is only from Forum page?
17:27:32StefanSalewskiQuestion: what does "type time_t* {.importc: "time_t", header: "<sys/time.h>".} = int" as used in wrappers of cowboy coder?
17:28:02*Sembei quit (Read error: Connection reset by peer)
17:28:03*gour quit (Disconnected by services)
17:28:04*gour___ joined #nim
17:28:19*gour___ is now known as gour
17:29:57*Sembei joined #nim
17:30:34ldleworkStefanSalewski: its really easy to make pull requests for fixes like that
17:30:37ldleworkthe website thing
17:31:11ldleworkStefanSalewski: it defines an import from a c library
17:31:21*repax quit (Ping timeout: 250 seconds)
17:32:03ldleworkhere it is importing a type, "time_t" as "time_t" as defined in "sys/time.h" which returns an int
17:32:19ldleworkI think
17:32:21ldlework:)
17:35:26StefanSalewskiIdleworks, import from c lib is clear, import type time_t also. The " = int" is where I have no idea. May be a fallback?
17:35:50ldleworkStefanSalewski: I imagine it means like, "this type has the same size as an int"
17:37:23EXetoCit's just like any other type definition, so you can make it an object if you want
17:38:56EXetoCif the C type is not opaque obviously. the binary layout needs to match in any case
17:39:39EXetoCgrep for "importc.*object" in the compiler dir if you want to see more examples
17:40:34*fowlmouth joined #nim
17:40:56EXetoCbut the plan is to minimize the occurrences so as to be more target-agnostic
17:40:58*askatasuna joined #nim
17:41:43*StefanSalewski quit (Quit: Page closed)
17:43:37*fowl quit (Ping timeout: 240 seconds)
17:46:39*StefanSalewski joined #nim
17:48:18*xcombelle joined #nim
17:53:52*StefanSalewski quit ()
17:58:26*yglukhov__ quit (Ping timeout: 256 seconds)
17:59:11*flaviu joined #nim
18:03:43*vendethiel quit (Ping timeout: 255 seconds)
18:13:44flaviuAraq: Calling sass "Ruby-DSL-for-fixing-CSS-of-the-week" is unfair. It's been around two years longer than nim has.
18:15:23*vendethiel joined #nim
18:29:45*askatasuna quit (Quit: WeeChat 1.0.1)
18:32:03*mbenadda quit (Quit: Be back later ...)
18:32:25*kniteli joined #nim
18:32:29*mbenadda joined #nim
18:35:23EXetoCit does seem to be a well-established tool, and it does serve a purpose
18:40:27*yglukhov__ joined #nim
18:44:18ldleworkcan someone review https://github.com/Araq/Nimrod/pull/1753
18:44:22ldlework(its trivial)
18:47:38EXetoCI would just add an empty line after each block, that's all
18:48:10ldleworkWhat do you mean?
18:48:15ldleworkI didn't change any of the formatting
18:53:43EXetoCit's consistent apparently
18:54:13*skyfex joined #nim
18:54:15*zio_tom78 joined #nim
18:55:56zio_tom78Guys, I've read the IRC logs of the last two days
18:56:24zio_tom78I suggest you to do the same
18:56:44ldleworkWe've been here, why would we need to read them
18:57:14zio_tom78Re-read them, I assure you it's useful
18:57:42*Matthias247_ joined #nim
18:58:01ldleworkyeah maybe you could just make your point
18:58:24zio_tom78A overall change of tone might help when discussing things in a public forum
18:58:43EXetoCsure
18:59:16skyfexI'm getting an error when trying to run nimble
18:59:42skyfexhttp://pastebin.com/EC4UqPWa
18:59:53skyfexIs this a known issue?
19:00:05EXetoCthat's all?
19:00:16skyfex(Missed a line: SIGSEGV: Illegal storage access. (Attempt to read from nil?))
19:00:17*Matthias247 quit (Ping timeout: 240 seconds)
19:00:22*rpag joined #nim
19:00:44skyfexjson.nim is tryng to read from a nil cstring
19:00:51skyfexhaven't found out why yet
19:00:53zio_tom78When a few days ago somebody complained about being mistreated on #rust, one of the core developers immediately answered and promised immediate action
19:01:14ldleworkzio_tom78: who do you feel was mistreated
19:01:20*BitPuffin quit (Ping timeout: 256 seconds)
19:01:36EXetoCskyfex: is the latest issue relevant?
19:02:00EXetoCdid you browse the issue list?
19:02:08skyfexYes, same issue
19:02:09skyfexDuh
19:02:29skyfex(sorry)
19:03:26zio_tom78I am not saying the same applies here, I'm saying that #nim should care about its participants as #rust does
19:04:12zio_tom78Apparently in #rust there are people that check that conversations evolve in the most respectful way for everybody
19:04:16ldleworkzio_tom78: if anything, the last days have been being an cactus to Araq
19:04:24ldleworkbeen me being*
19:04:32shevya cactus?
19:04:41ldleworka pain in the ass
19:04:48shevylol
19:04:57zio_tom78Idlework: I agree
19:05:01shevyhow you can associate that with a cute small cactus plant!
19:05:15EXetoCsuch cuddly
19:05:37shevypeople even jump into larger cactuses, like in the jackass movie!
19:06:13EXetoC(>_<)
19:08:04*zio_tom78 quit (Quit: Bye)
19:08:33*enurlyx joined #nim
19:08:39*Trixar_za quit (Ping timeout: 244 seconds)
19:08:40*Trixar_za joined #nim
19:08:49*yglukhov__ quit (Quit: Be back later ...)
19:12:41*nimnoob joined #nim
19:17:22*yglukhov__ joined #nim
19:37:42*irrequietus joined #nim
19:49:40*xcombelle quit (Ping timeout: 250 seconds)
20:01:14*BlaXpirit-UA quit (Quit: Quit Konversation)
20:01:33*BlaXpirit joined #nim
20:01:34*EXetoC1 joined #nim
20:04:17*EXetoC quit (Ping timeout: 240 seconds)
20:20:10ldlework Araq mind merging, https://github.com/Araq/Nimrod/pull/1753
20:30:44Araqhi ldlework. I'm not sure this shouldn't be a new proc instead.
20:31:06ldleworkAraq: I figured that since it does not affect the API it was fine
20:31:15ldleworkAlso, do we introduce stipple versions of every drawing func?
20:31:28ldleworkthat seems like bloat for something that default args handles well
20:32:31ldleworklet me know what you want
20:32:39Araqwell I'm not sure
20:32:48Araqis stippling all that common?
20:33:15ldleworkIts certainly inconvenient for someone who wants a stippled version of a circle, for example, to have to fork the existing drawing routine in their own code.
20:33:35*brson joined #nim
20:33:56ldleworkWhich is what I will have to do if you don't like supporing a stipple option
20:35:14Araqwell I can say the same for transparency
20:35:32Araqso thing is, we need to expose the *algorithm* in form of templates instead
20:35:57ldleworkAraq: that's interesting
20:39:05ldleworkAraq: okay hold up on the PR
20:39:08ldleworkI will think about that suggestion
20:43:53*boydgreenfield joined #nim
20:46:27boydgreenfieldAraq: FYI just squashed and got you a clean styling PR.
20:46:39boydgreenfield(was on a flight earlier, sorry for the delay)
20:52:25ldleworkboydgreenfield: do you know what I mean about not being able to pull out proc names as you scroll down the doc pages?
20:52:42ldleworkbecause the syntax highlighted proc definitions are thin, and not very 'header' like?
20:55:06boydgreenfieldIdlework: yes, I hear you. The challenge is that the proc names are styled the same way as all other identifiers – so they can’t be bolded/popped visually w/o either a) popping all the other types and the like; or b) changing how they’re classed.
20:55:34boydgreenfieldIdlework: And by “can’t”, I really mean, “in playing around with it, I couldn’t get it to work in a way that looked nice and was a real improvement"
20:55:38ldleworkI highly recommend bolding the proc names.
20:55:53Araqwe should do b)
20:56:43ldleworkAnd its not just proc's of course
20:56:51ldleworktype names too
20:56:52boydgreenfieldHappy to – that’s just a breaking change w/r/t the rST output, so I hadn’t wanted to muck about w/o others’ thinking it was necessary
20:57:46boydgreenfieldIdlework: You mean in the types and consts sections?
20:57:47ldleworkboydgreenfield: can't you do it with relative selectors?
20:57:51ldleworkboydgreenfield: yeah
20:57:57ldleworkpre > Identifier
20:58:01ldleworkor rather
20:58:05boydgreenfieldIdlework: Am playing around with that as we speak
20:58:05ldleworkpre > Identifier:first-child
21:04:22ldleworkI can't even get that font to be very bold at all
21:05:01*flaviu quit (Remote host closed the connection)
21:06:33boydgreenfieldIdlework: Unfortunately, I think first-child is limited to the first child of pre, not the first instance of Identifier; but there’s surely another hacky way of doing this
21:10:09*flaviu joined #nim
21:11:19ldleworkboydgreenfield: no way
21:11:31boydgreenfield?
21:11:38ldleworkboydgreenfield: pre foo:first-child, selects the first foo under pre
21:12:29Araqskyfex: afaict this issue has been resolved with the devel version of the compiler
21:13:14boydgreenfieldIdelwork: unfortunately, I’m fairly sure it selects the foo *if* it’s the first-child (or at least that’s all I can get to directly work)
21:13:20ldleworkboydgreenfield: http://codepen.io/anon/pen/bNexWr
21:13:53ldleworkhmm
21:14:09boydgreenfieldIdlework: I.e., “pre span.Identified:first-child” will *not* select ‘my_procname’ in <pre><span class=‘other’>proc</span> <span class=‘Identifier’>my_procname</span)
21:14:14boydgreenfieldI’ll get it
21:15:35ldleworkboydgreenfield: its first-of-type
21:15:40ldleworkhttp://codepen.io/anon/pen/bNexWr
21:15:49ldlework:)
21:16:26boydgreenfieldIdlework: Ah ha, well that’s much cleaner! I didn’t know of first-of-type before.
21:16:32ldleworkme either!
21:16:41ldleworkthe web is getting better :)
21:16:43ldleworkslowly
21:16:59boydgreenfieldand phew
21:17:00boydgreenfieldhttp://caniuse.com/#search=first-of-type
21:17:18boydgreenfield(incidentally you can get it to work by going through the cases with the + sibling operator, but that’s messy_
21:17:20boydgreenfield*)
21:20:39*StefanSalewski joined #nim
21:21:32*boydgreenfield quit (Ping timeout: 250 seconds)
21:22:00*dyu quit (Quit: Leaving)
21:23:56*boydgreenfield joined #nim
21:24:25StefanSalewskiNo real progress understanding this "type time_t* {.importc: "time_t", header: "<sys/time.h>".} = int" seen in a cowboy-coders wrapper. Was curious because I used myself
21:24:33StefanSalewskitime_t = int64 # generally 64 bit -- may we use times.Time ?
21:25:11StefanSalewskiI think I will leave it as is it and wait until someone complains...
21:27:00boydgreenfieldIdlework: Success. “dt pre > span.Identifier {special highlights}” and “dt pre > span.Identifier ~ span.Identifier {override those with inherit}”. Now onto what solves this problem...
21:35:45StefanSalewskiOK, found something...
21:36:06boydgreenfieldIdlework: Laptop battery is about to die, but here’s a working version with “popped” definitions. http://a.pomf.se/rwszyb.html
21:36:31boydgreenfieldIdlework: I haven’t tried a lot of colors/weights/etc., but would you mind letting me know what you think could work?
21:36:40boydgreenfieldI’ll check back in a few hours and then tweak and rebase my PR.
21:37:22StefanSalewskiin module time.nim we have exactly the same: TimeImpl {.importc: "time_t", header: "<sys/time.h>".} = int
21:38:16StefanSalewskiSo indeed it should have some sense, and I will use time:Time for time_t then. Thanks.
21:38:41*boydgreenfield quit (Quit: boydgreenfield)
21:39:22AraqStefanSalewski: I cannot help you as I don't understand your question.
21:40:17StefanSalewskiThe question was the meaning of the "= int" in the type definition.
21:42:02ldleworkStefanSalewski: I thought we already went over it
21:42:06ldleworkits the size of the type
21:44:02StefanSalewskiI have to admit that I don't understand it. We define the time_t type using importc and at the same time = int assignment.
21:44:38Araqyou cannot define a type using importc.
21:44:49Araqthe definition reads like:
21:45:08Araq"Time is an alias for int. Oh btw codegen, map this to time_t."
21:46:26Araqand there are further gotchas here. 'importc' on types really only works reliably for nominal types.
21:46:58Araqotherwise the compiler is allowed to merge your type 'Time' with 'int' and lose the importc request
21:47:57Araqthe compiler tries to not do that though, so TimeImpl is safe for now
21:48:02StefanSalewskiOk, now I understand better. I wonder still about int a bit, generally time_t should be 64 bit in nearly all cases following a discussion at stack overflow.
21:48:20ldleworkStefanSalewski: yeah, on 64 bit machines
21:48:25ldleworkin which case int *is* int64
21:48:51StefanSalewskihttp://stackoverflow.com/questions/471248/what-is-ultimately-a-time-t-typedef-to
21:49:29ldleworkStefanSalewski: Unix and POSIX-compliant systems implement the time_t type as a signed
21:49:31ldlework integer (typically 32 or 64 bits wide) which represents the number of seconds since the start of the Unix epoch
21:49:47ldleworkStefanSalewski: how could a 32 bit machine rely on a type that can only be 64 bit?
21:50:05StefanSalewskiOk, thanks. I think I should not waste your time. We will proof it sooner or later. And module time.nim is fine. Thanks.
21:50:27*gour quit (Quit: WeeChat 1.0)
21:50:57ldleworkStefanSalewski: you seem offended or something?
21:52:12*ldlework shrugs.
21:58:26StefanSalewskiNo. It's just not easy for my to understand all that. And I think it is really not that easy, see the question at stack overflow. But Araqs explanation helped.
21:59:43StefanSalewskiAnd now I know that time_t definition is included in module time.nim, so I have not to worry any more. Sorry for missing that.
22:00:41ldleworkStefanSalewski: you're basically saying: "Look at this stackoverflow that says time_t should be 64 bit!"
22:01:16ldleworkThe reason stackoverflow says that it should be 64 bit *****going forward in the future****** is to avoid Y2k36 errors when 2036 rolls around
22:01:23ldleworkNot because POSIX defines time_t to be 64 bit.
22:01:53ldleworkI don't know what part is hard for you to understand but 32bit machines **cannot** use native 64bit integers so this isn't even an option
22:02:11ldleworkSo even if you and I agree, "32bit time_t types will cause issues in the future"
22:02:28ldlework32 bit machines have no way to just magically use 64 bit integers
22:02:36ldleworkStefanSalewski: this is why in nim it is "= int"
22:02:40Araqldlework: int64 works just fine on 32 bit machines
22:03:02StefanSalewskiNo. I really trust module time.nim more than stack-overflow. Stack-Overflow was one of my google results when I was looking for time_t definition ealier.
22:03:03ldleworkAraq: huh
22:03:25ldleworkAraq: so I can compile a binary on 64bit and just run it on 32bit machines?
22:03:29ldleworkand it 'works just fine' ?
22:03:30flaviuldlework: No.
22:03:42flaviuBecause x64 has more registers and more instructions.
22:03:56Araqldlework: it's true that the compiler needs to emit more instructions for these ops, but 'long long int' works on 32bit x86.
22:04:07ldleworkI guess what I really mean to say is
22:04:19ldleworkon a 32 bit machine, time_t is going to be compiled as a 32 bit integer
22:04:25ldleworkand so Nim defines it as "= int"
22:04:38ldleworkso that it matches whatever the native c lib is compiled to use
22:04:42flaviuBut you can compile a program for both x86 and x86_64, the only difference is that i64s will be stored in two registers instead of one and that addition needs to be emulated.
22:04:51ldleworkand that making it "= int64" is not going to work
22:05:05ldleworkflaviu: Araq I understand now, thanks
22:05:17Araqnot really. Nim defines it as 'int' because we found that is the best heuristic for the time being
22:05:25ldleworkwhat does that mean?
22:05:47Araq32bit Linux may map time_t to 64 bits
22:06:10Araq32bit Solaris may map it to 32 bits
22:06:12ldleworkAraq: but only because something more fundamental is set to use 64 bits right?
22:06:31ldleworkand so whatever that is, is the same thing that will inform Nim what to use for 'int' ?
22:07:01Araqthe definition is like "meh, pretend it's int, that's not too bad and rely on the codegen to emit time_t which is always correct"
22:08:45StefanSalewskiOK, Araq, thats makes it even more clear to me.
22:12:06Araqalso note that often the old OS version defined it to 32bits whereas never versions define it to 64bit
22:12:48Araqand on windows ofc it also depends on the used C compiler
22:13:12*kmcguire quit (Ping timeout: 245 seconds)
22:14:33EXetoC1ldlework: what to use for int? the size of int is that of a pointer
22:15:51AraqStefanSalewski: and you're right, times.Time is what you should use for time_t in wrappers.
22:17:29*shevy left #nim ("I'll be back ... maybe")
22:17:33EXetoC1ldlework: 32 bits on 32-bit architectures and 64 bits on 64-bit architectures
22:17:43ldleworkEXetoC1: that's what I was saying
22:17:49ldleworkint will be defined to be whatever the arch is
22:18:12ldleworkso I was assuming that time_t would also be defined as whatever the arch is
22:18:21ldleworkbut I guess that is configurable
22:18:32EXetoC1ok. I couldn't understand what you meant
22:18:37*EXetoC1 is now known as EXetoC
22:19:04ldleworkI'll just stop trying to put forth my own explanations and saying anything for certain.
22:19:06ldleworknever goes well
22:20:52fowlmouthwhats up nims
22:26:13*StefanSalewski quit ()
22:41:43*Trustable joined #nim
22:52:37*kmcguire joined #nim
22:58:41*yglukhov__ quit (Read error: Connection reset by peer)
22:59:17*yglukhov__ joined #nim
23:10:43*tinAndi joined #nim
23:22:43*willwillson joined #nim
23:45:29*boydgreenfield joined #nim
23:48:14*vendethiel quit (Quit: q+)
23:50:12*yglukhov__ quit (Read error: Connection reset by peer)
23:50:39*j3rky joined #nim
23:50:45*yglukhov__ joined #nim
23:55:43*kmcguire quit (Ping timeout: 250 seconds)