<< 15-07-2018 >>

00:02:23*NimBot joined #nim
00:02:35dom96hm
00:03:53*jamesroseman quit (Ping timeout: 244 seconds)
00:04:13CodeVance?
00:21:42FromDiscord<exelotl> if I have `proc foo(n:cint)` is there a nicer way to allow `foo(some_int)` without having to make a wrapper which takes int?
00:21:53*find0x90_ joined #nim
00:23:00*find0x90 quit (Ping timeout: 244 seconds)
00:23:33FromDiscord<exelotl> cause I was happily doing foo(0) until I tried to put 0 in a variable and got a compiler error :|
00:23:49FromGitter<Varriount> exelotl: Why not just have the proc take an int?
00:24:12FromDiscord<exelotl> it's imported from C
00:24:16FromGitter<Vindaar> well, you can call `.int` on the argument to convert it. Personally would write a wrapper though
00:24:37FromGitter<Vindaar> unless you only call it in one place or something
00:27:58FromGitter<Varriount> And what are you going to do it the input is preside the range of a cint?
00:29:35FromDiscord<exelotl> hmm I took a look at some existing library bindings and they all seem to just expose functions with cint and call it a day
00:29:40FromDiscord<exelotl> so I guess I'll just do that
00:29:45FromGitter<Vindaar> well sure, depending on what kind of function we're talking about that matters and one needs to check for the size of the input
00:30:23FromGitter<Vindaar> there's plenty of libraries, which don't do that. some obviously only want to be pure wrappers
00:30:42FromGitter<kayabaNerve> @exelotl afaik, you most do cint and int (or SomeiIteger)
00:30:59FromGitter<kayabaNerve> *SomeInteger
00:31:21*craigger_ joined #nim
00:33:15FromDiscord<exelotl> I'm exporting sunvox music functions like `sv_play(slot)` where slot is a running instance of the sunvox engine. Generally you would only have a handful of slots, so if the input exceeds the size of a cint, something probably went wrong already xD
00:33:20*craigger quit (Ping timeout: 244 seconds)
00:35:23*craigger joined #nim
00:35:57*craigger_ quit (Ping timeout: 240 seconds)
00:38:13*BitPuffin quit (Remote host closed the connection)
00:39:47skrylarhuh. sunvox was neat
00:40:00*craigger quit (Read error: Connection reset by peer)
00:41:57FromDiscord<exelotl> ye ;)
00:42:04*craigger joined #nim
00:43:38FromDiscord<exelotl> I mostly use Renoise nowadays but I think SunVox could be really cool for game audio. The API is really simple and you can have all these fancy realtime effects.
00:45:31*riidom joined #nim
00:49:36*krux02 quit (Remote host closed the connection)
00:50:26*krux02 joined #nim
00:52:39skrylari haven't done a lot with renoise in quite a while.
00:53:09skrylarhaven't really got a good enough grasp on the rigid grids for composing
00:54:54FromDiscord<exelotl> it's all about using cut and delay commands for triplets and stuff x)
01:19:16CodeVancewhat's the equivalent of C++ `new GLUint[128]` in nim?
01:30:18*donlzx joined #nim
01:32:59FromGitter<data-man> ```var seq = newSeqGLUint (128)```
01:37:15skrylaris that even allowed? wouldn't it be var birds: GLUint <newline> newSeq(birds, 128)
01:37:32skrylaror array[0..127, GLUint]
01:39:27*dddddd quit (Remote host closed the connection)
02:01:02FromGitter<data-man> @skrylar: If @CodeVance would ask about ```std::array<GLUint, 128>``` then I'd suggest ```array[0 .. 127, GLUint]``` :-D
02:08:48skrylarbleh i guess tomorrow is either table layouts or tinkering with glib/gobject
02:13:58*endragor joined #nim
02:20:48skrylarit looks like it might be a good idea to have side-channel data for a property assignment
02:21:41skrylarreading about loops that happen when you try to update a text field from a database and then the gui tries to kick an event from the text change which would set the database and then THE END IS NEVER THE END IS NEVER
02:23:24CodeVanceor just raw assignment, skipping the text change
02:23:29CodeVanceevent
02:30:06*endragor quit (Remote host closed the connection)
02:32:58skrylarCodeVance, doesn't that require you to break out of the model
02:33:52CodeVanceyour going to have to do it in anycase
02:34:24CodeVanceMight as well hard code it and keep track of the places you do
02:34:56CodeVanceinput -> raw set output -> trigger events while ensuring no looping occurs
02:35:33skrylarwhat i'm thinking of is borrowing emacs concept of the interactive flag so you can have ex. a FRP Property for the current record in a db (example code) which has a listener for changes and then can propagate to the property of a text field (but the side-channel would be {interactive: false}) and thus the listener to the text field can do keep(interactive == true) which kills the loop
02:37:06skrylaror something
02:38:07*FromGitter quit (Remote host closed the connection)
02:38:15*FromGitter joined #nim
02:39:36CodeVanceokay wait. You have a DB and a front end? Then when the DB changes it sends an event to the frontend saying its value has changed. Ok. then When the front end changes you send an event to the DB that your frontend has changed. Ok. Is the DB like some sort of server which broadcasts events to all other listeners?
02:39:52CodeVanceYou can also just keep track of the "origin" of the event and if it comes back it gets ignored
02:42:25skrylari don't have the db [yet], just reading and working out how FRP event handling works with UIs
02:42:51skrylari ran in to a post where people were talking about simple CRUD gui's need .. mental help, in order to avoid infinite loops
02:45:36skrylar(i did have a situation like this in an old pomodoro app; instead of a db, a timer would tick down a slider control and it had some edge case code to avoid the looping) although that was spaghetti coded
02:46:39CodeVanceWell here's a tip. Don't use the "paradigm" to run the "paradigm" its not turtles all the way down its only turtles on the grass
02:47:04CodeVanceYou don't have to make your code entirely work within a system
02:47:37CodeVancewhats the problem though?
02:49:24skrylarthe problem is that semantic information about an event is lost when you assign the property value
02:53:04CodeVancewhat about having a "current event"
02:53:36CodeVanceor just removing the origin from the listener list
02:55:34skrylarthe listener list is terrifying atm
02:59:00*craigger_ joined #nim
03:01:21*craigger quit (Ping timeout: 248 seconds)
03:03:58CodeVanceDo you have a event server thingy? Just skip the sender when propogating the event
03:06:18skrylarit's a nim clone of baconjs, which does FRP events. at present there is an observer object, and then you tell it things like "filter with this function" which creates a new observervable and subscribes a closure to the old observable to run the filter logic. so it's not a 1:1 caller-callee like signals and slots or callbacks, it's a stream of data filtered through closures
03:08:19skrylarreading stuff from elm/haskell to see how they dealt with it
03:08:40*craigger joined #nim
03:09:04*craigger- joined #nim
03:09:53*craigger_ quit (Ping timeout: 244 seconds)
03:09:55CodeVancefilter( not it in ignorelist) ?
03:10:10*craigger quit (Read error: Connection reset by peer)
03:10:10skrylartheres no source data ;p
03:10:41*krux02 quit (Remote host closed the connection)
03:10:43skrylarit's actually a really easily avoidable problem, so will probably just put in some simple integer tag or whatever somewhere
03:11:04*craigger joined #nim
03:11:11skrylareven in the db case i mentioned you would more sanely just route the output of the text field to a temp object (so you can validate, or compare it to the original values before sending data) not loop it
03:11:12CodeVancegd luck?
03:14:32*craigger- quit (Ping timeout: 244 seconds)
03:16:00*craigger_ joined #nim
03:17:32skrylarCodeVance, yeah.
03:18:21*craigger quit (Ping timeout: 264 seconds)
03:19:07skrylarhave seen some impressive sample code in places where the spaghetti was massively cleaned up with frp
03:19:53FromGitter<data-man> Looks like you found each other, guys. But why do not you use private messages? What you are discussing relates to Nim?
03:25:57skrylardata-man does writing a module in nim relate to nim?
03:26:33skrylarhttps://github.com/skrylar/cobweb :P
03:29:13*craigger_ quit (Read error: Connection reset by peer)
03:31:00*craigger joined #nim
03:37:18*rockcavera quit (Remote host closed the connection)
03:47:47FromGitter<rayman22201> @Varriount are you online and feeling like working on better-doc-search?
03:51:31*donlzx quit (Remote host closed the connection)
04:02:02*craigger_ joined #nim
04:02:24*craigger quit (Quit: bye)
04:07:09*ftsf joined #nim
04:11:22FromGitter<citycide> is it possible to fix the links to stdlib imports with generated docs?
04:19:38*craigger joined #nim
04:21:27*craigger_ quit (Ping timeout: 240 seconds)
04:22:41*craigger_ joined #nim
04:24:48*craigger quit (Ping timeout: 268 seconds)
04:35:03*craigger joined #nim
04:35:35*craigger- joined #nim
04:36:58*craigger_ quit (Ping timeout: 264 seconds)
04:39:27*craigger quit (Ping timeout: 240 seconds)
04:46:38*craigger joined #nim
04:50:14*craigger- quit (Ping timeout: 260 seconds)
04:52:36*craigger_ joined #nim
04:53:44*craigger quit (Ping timeout: 260 seconds)
05:00:09*craigger joined #nim
05:01:21*craigger_ quit (Ping timeout: 248 seconds)
05:02:35*craigger_ joined #nim
05:05:10*craigger quit (Ping timeout: 264 seconds)
05:16:57*craigger_ quit (Ping timeout: 240 seconds)
05:21:12FromGitter<rayman22201> delayed reaction, but I think I found the bug in re module that @tim-st was having
05:21:54FromGitter<rayman22201> ```code paste, see link```
05:22:08FromGitter<rayman22201> oh gawd. copy pasta has failed
05:25:04FromGitter<rayman22201> https://gist.github.com/rayman22201/63d571e7c58bd496d4f299cc84da0bea
05:28:52*ftsf quit (Ping timeout: 244 seconds)
05:38:23*craigger joined #nim
05:40:52FromGitter<Varriount> @rayman22201 I'm awake now.
05:41:17FromGitter<rayman22201> Good (insert timezone appropriate greeting here)
05:41:55FromGitter<rayman22201> :-)
05:42:27FromGitter<Varriount> How are the import links currently broken?
05:43:39FromGitter<rayman22201> I don't know. @citycide are you still here?
05:50:23*nsf joined #nim
05:56:06*arecacea1 quit (Remote host closed the connection)
05:56:27*arecacea1 joined #nim
06:10:17*ftsf joined #nim
06:10:57*skrylar quit (Ping timeout: 240 seconds)
06:15:53*miran joined #nim
06:22:58*Pisuke joined #nim
06:23:37*MyMind quit (Ping timeout: 256 seconds)
06:25:58*wildlander joined #nim
06:26:20*endragor joined #nim
06:36:20*Trustable joined #nim
06:46:19*wildlander quit (Quit: Konversation terminated!)
07:04:23*Trustable quit (Remote host closed the connection)
07:23:55*Gnjurac joined #nim
07:26:27FromGitter<tim-st> @rayman22201 thanks!
07:28:23FromGitter<tim-st> nimble.directory uses jester 0.1.0 and needs 0.3.0 asap
07:28:55*endragor quit (Remote host closed the connection)
07:29:19FromGitter<tim-st> well, maybe this is the reason for the downtime
07:38:45FromGitter<Bennyelg> or httpbeast :P
07:43:51FromGitter<tim-st> I meant because of security
08:02:56Gnjuracdoes jester have like some kind of DataAnotations like in c#
08:03:01Gnjuracfor validating
08:11:28*le94 joined #nim
08:11:38*Vladar joined #nim
08:12:24*le94 is now known as le98
08:13:38*le98 quit (Client Quit)
09:05:25*rockcavera joined #nim
09:10:44FromGitter<Varriount> Gnujurac: For validating what?
09:19:09*fastrom quit (Ping timeout: 260 seconds)
09:22:33dom96It doesn't
09:27:33FromGitter<Vindaar> @rayman22201 your example is different. The reason the case with `seq` doesn't work in your example, is that `match` does not resize the given input sequence. Since `matchesSeq` is of size 0, nothing will be stored. Change the declaration to ⏎ ⏎ ```var matchesSeq = newSeq[string](10) # random size``` ⏎ ⏎ and it works fine with seqs as well [https://gitter.im/nim-lang/Nim?at=5b4b1385c02eb83d7c76175c]
09:30:04*fastrom joined #nim
09:34:09*dddddd joined #nim
09:34:42Gnjuracincoming stuff :)
09:35:19FromGitter<tim-st> Does someone know if this `$castcstring (cstringPtr)` is the same as newStringOfCap + copyMem + setLen?
09:35:42FromGitter<tim-st> I tried to find the implementation but it's a bit hidden
09:40:26mirancan anybody (maybe dom96) explain this behaviour? http://ix.io/1heK/
09:43:57FromGitter<bevo009> With the func keyword, is the {. noSideEffect .} pragma not implemented yet in Nim 0.18.0?
09:44:15miranit is 0.18.1 feature AFAIK
09:45:16FromGitter<bevo009> Is 0.18.1 released, or is that devel?
09:45:25mirandevel
09:46:54FromGitter<bevo009> I don't suppose there's an easy guide to installing chooseNim/devel anywhere?
09:47:18miranhttps://github.com/dom96/choosenim#installation
09:47:35miranit is quite straight-forward
09:49:43FromGitter<bevo009> Ta. I might try it next weekend...windows installations don't always go smoothly with Nim, from what I've seen
09:50:19miranoh, on windows choosenim installs 32-bit version of nim, IIRC
09:53:19FromGitter<bevo009> Is this guy Fred Heath around the forums/IRC at all? Stellar video https://youtu.be/_HeU8yg_WaE?t=1306
09:59:36*ftsf quit (Ping timeout: 244 seconds)
10:00:22*FromGitter quit (Read error: Connection reset by peer)
10:00:30*FromGitter joined #nim
10:05:26*fastrom quit (Quit: Leaving.)
10:06:50FromGitter<tim-st> does this proc works for the empty string? https://github.com/status-im/nim-rocksdb/blob/840d470eb9f0bd8115d26ee66017d4bc20197c7e/rocksdb.nim#L122
10:07:16FromGitter<tim-st> saw this addr(result[0]) pattern quite often...
10:07:33*krux02 joined #nim
10:09:21FromGitter<Vindaar> `addr result[0]` for a `seq` or `string` returns a pointer to the first element of the data, i.e. what you need if C demands a pointer to some buffer etc
10:09:40FromGitter<tim-st> exactly, but has the empty string a first element?
10:10:04FromGitter<tim-st> well, I tested it, and it doesnt work
10:11:11FromGitter<Vindaar> well, if it's empty there's no data to point to, no?
10:11:35FromGitter<tim-st> yes, but the proc should return the empty string, instead it raises
10:12:00FromGitter<tim-st> I didnt test the exact proc, but implemented the same idea, I think it doesnt work for this code too
10:13:27FromGitter<Vindaar> that depends on the context imo. there's many cases where you might not want to have that check inside of that proc, because e.g. you always do the check in the calling scope
10:13:51FromGitter<Vindaar> if it's supposed to be a safe proc, sure
10:14:10*fastrom joined #nim
10:14:26FromGitter<tim-st> ok, thanks
10:14:40FromGitter<tim-st> maybe @mratsim can say if in this context it is safe
10:17:10*fastrom quit (Client Quit)
10:18:35FromGitter<tim-st> oh, I see, actually release version proc the check is done; https://github.com/status-im/nim-rocksdb/blob/840d470eb9f0bd8115d26ee66017d4bc20197c7e/rocksdb.nim#L138
10:18:54FromGitter<tim-st> *in the
10:29:55FromGitter<Vindaar> @tim-st @rayman22201 regarding the regex. I understand the "issue" with `findAll` now. Araq said yesterday: https://irclogs.nim-lang.org/14-07-2018.html#21:38:40 and well, he's right (as usual :D). What `findAll` returns is the matched substring (!) and the matched groups within that substring!
10:31:45FromGitter<Vindaar> take a look here: https://regex101.com/r/kat7jB/1/ ⏎ `findAll` returns everything marked in blue and not (as you expected) the matched group marked in green :)
10:32:54FromGitter<Vindaar> the relevant code: https://github.com/nim-lang/Nim/blob/master/lib/impure/re.nim#L341-L342
10:33:14FromGitter<tim-st> yes, I understood that too, but that's quite different from e.g. python (and maybe other langs)
10:33:32FromGitter<tim-st> I didnt expected (and wanted) the result I got in nims way
10:34:34FromGitter<Vindaar> but then just use the`match` proc to get what you need. I don't understand your problem then?
10:35:12FromGitter<tim-st> match returns a bool?!
10:35:14FromGitter<Vindaar> would it be nice to have an iterator, which returns the matched groups and not substrings? maybe yea, but that's a different topic :)
10:35:43FromGitter<tim-st> I wanted seq[string(that is matched result)]
10:36:19FromGitter<tim-st> these iterators are available: https://nim-lang.org/docs/re.html#15
10:36:41FromGitter<tim-st> every one of them matches "blue"
10:37:04FromGitter<Vindaar> and you can have that if you simply define do: ⏎ ⏎ ```var matchesSeq : seq[string] = newSeq[string](1) ⏎ echo match(data, yourRegex, matchesSeq)``` ⏎ ⏎ then you have your seq containing the matched group [https://gitter.im/nim-lang/Nim?at=5b4b23d095e03e3d7b4d20fd]
10:37:16FromGitter<Vindaar> yes, I know
10:37:38FromGitter<tim-st> ah, ok thanks, that could have a clear proc name
10:38:19FromGitter<tim-st> now I see it too, but it's not findable for average nim user
10:38:21FromGitter<Vindaar> but take note that the given `seq` needs to have capacity to store your number of expected matched groups :)
10:38:49FromGitter<tim-st> that's not known before?
10:39:16FromGitter<Vindaar> the `match` proc simply does not resize your `var seq` in case it's not long enough
10:39:25FromGitter<tim-st> lol, that's not good..
10:39:43FromGitter<Vindaar> since you define your `regex`, you know how many groups you can match anyways, so it's not a problem
10:40:11FromGitter<tim-st> ok, I thought it was about the total number of matches, not about the number of groups per match
10:41:03*fastrom joined #nim
10:46:39*miran quit (Ping timeout: 260 seconds)
11:06:35*Gnjurac quit (Remote host closed the connection)
11:09:08*BitPuffin joined #nim
11:27:40*gangstacat quit (Ping timeout: 256 seconds)
11:41:18*Ven`` joined #nim
12:04:24*Perkol joined #nim
12:10:16*ftsf joined #nim
12:12:26*nc-x joined #nim
12:13:16nc-xIs it expected that this code https://pastebin.com/i98DaBww gives error `redefinition of A` ?
12:14:11Araqyes
12:17:07nc-xOkay
12:22:49krux02nc-x, there is a pure enum if I am correct
12:24:42nc-xYes, that fixes the problem. But i was thinking that it should have been an error at the time of usage that it is ambiguous and not this redefinition error.
12:25:38krux02within the same package it is an "early" error. But when you split the two enums in two packages it will tell you that it is ambiguous
12:25:50krux02and then you can disambiguate with the package prefix
12:25:59krux02but within the same package you can't
12:26:37nc-xBut isn't `a.A` and `b.B` two different entities even within the same package
12:26:57nc-xSorry, I mean `a.A` and `b.A`
12:27:30krux02for pure enums it is
12:29:58nc-xThat is what I was thinking about when I said they should give error: ambiguous. Maybe the compiler should say they are ambigious and we need to disambiguate by prefixing the enum name.
12:30:07nc-xBut anyways, this is good enough.
12:30:42*Perkol quit (Remote host closed the connection)
12:36:28*nc-x quit (Quit: Page closed)
13:02:45FromGitter<tim-st> Araq: I now tried htmlparser but it doesnt work on html.findall("P") only one html.findall("p") although the actual name is "P", is it a bug?
13:04:18FromGitter<tim-st> https://nim-lang.org/docs/xmltree.html#findAll,XmlNode,string,seq[XmlNode]
13:04:44FromGitter<tim-st> *on
13:08:56AraqI guess.
13:08:56AraqI guess it's normalized to lowercase tags
13:09:31FromGitter<tim-st> ok
13:12:30*knx joined #nim
13:12:38*knx left #nim (#nim)
13:13:30*Perkol joined #nim
13:15:00PerkolI've got this program: https://bpaste.net/show/4c4df64397db Sometimes it's outputs every supposed file, other only some. It's very inconsistent in it's behaviors. What may be the reason?
13:18:42AraqPerkol: strange. antivir protection?
13:18:56Araqunreliable hard disk?
13:19:38*miran joined #nim
13:20:11*stefanos82 joined #nim
13:21:48dom96cosmic rays? :)
13:23:15PerkolWhen I use a walkDirectory function without spawn it works okay
13:23:55krux02w3m
13:24:03krux02xtem
13:24:06krux02xterm
13:25:36mirancan anybody explain this behaviour? http://ix.io/1heK/
13:26:04miranwhy in the first example is it ok to have non-exhaustive `case`?
13:26:14*endragor joined #nim
13:28:55FromGitter<tim-st> Perkol: tried sync() ? maybe it exits before finished
13:29:12FromGitter<tim-st> https://nim-lang.org/docs/manual.html#parallel-spawn-spawn-statement
13:30:13PerkolYeah, my bad thanks.
13:30:27*endragor quit (Ping timeout: 240 seconds)
13:31:58FromGitter<citycide> @Varriount @rayman22201 the stdlib imports point to a URL on the same domain when they should point to nim-lang.org
13:33:04FromGitter<citycide> Unless I have to build docs with --project but that doesn't work, it doesn't create directories if they don't exist so it fails
13:33:28FromGitter<citycide> (Which I should probably file as a bug)
13:35:30*Ven`` quit (Read error: Connection reset by peer)
13:40:08*Ven`` joined #nim
13:45:25FromGitter<kaushalmodi> miran: About your example about non-exhaustive case, I haven't tried, but looks like a big if the first example didn't fail.
13:45:32FromGitter<kaushalmodi> *bug
13:46:29FromGitter<kaushalmodi> But what do you mean by the comment " why is now needed and not before?" in the second snippet?
13:46:54miran@kaushalmodi all examples run as they are written.
13:47:05FromGitter<kaushalmodi> The second snippet also has a case statement for string type.
13:47:30mirani mean - if it is not needed when you do `return xy`, why it is needed when you do `xy`
13:49:09FromGitter<tim-st> it seems the htmlparser has some problems about the `innerText` :(
13:49:13FromGitter<kaushalmodi> Hmm, so you mean that Nim allows non-exhaustive case for string type if returns are used?
13:49:47mirani have no idea what's going on, that's why i'm asking hoping that someone (Araq, dom96?) might know more
13:50:06FromGitter<kaushalmodi> krux02: FWIW pure enums are broken on devel
13:50:26krux02that is sad
13:50:29FromGitter<kaushalmodi> You can use the pure pragma enums without the prefix and it still works.
13:51:12krux02I rarely use enums and then I don't esup pure enums. But I think the overall trend of enums in programming language is this "pure" enum
13:52:12*FromGitter quit (Remote host closed the connection)
13:52:20*FromGitter joined #nim
13:56:51FromGitter<kaushalmodi> miran: There some delay here on Gitter.. I didn't get your earlier replies in time.. my last question was rhetoric :). So what does `first("z")` return in your example? Uncaught exception?
13:57:28FromGitter<narimiran> @kaushalmodi seems like a bridge is down. you get `0`, as this is the default value for `int`
13:58:21FromGitter<narimiran> there are no exceptions/warnings/errors
13:58:46Araqmiran: no bug here. if 'case' produces a value, every branch must produce a value
13:59:17Araqif 'case' doesn't produce a value, you don't have to write the 'else'.
13:59:38Araqkaushalmodi: that is not a bug.
13:59:49Araqneed to update the spec though.
13:59:51FromGitter<kaushalmodi> Hmm.. I kind of understand that.
13:59:52miranoh! so case doesn't have to be exhaustive *always*
14:00:00FromGitter<kaushalmodi> Yes, need to update the spec and docs
14:00:04mirani had no idea!
14:00:27FromGitter<tim-st> me too, thought it always needs to have all cases
14:00:28FromGitter<bevo009> A noob question...I'm using system.writeLine() to write 2 lines to a notepad file ⏎ It's supposed to insert `\n` after writing the line ⏎ But I'm getting both on the same line? ie `Line 1 ⏎ Line 2` ⏎ ... [https://gitter.im/nim-lang/Nim?at=5b4b537c866e0c6b15ab1ecf]
14:00:53FromGitter<kaushalmodi> Araq: So the case needs to be exhaustive it for "intermediate" values.. not if used for final returned values, right?
14:01:00miranAraq: but now there is another question - why does then `first` work, but `third` doesn't without `else`?
14:01:37FromGitter<kaushalmodi> Would non exhaustive case work if you did "result = .." instead of "return .." then?
14:01:52krux02Araq: would be nice, if `case` can produce a value, even if some of the branches end on {.noreturn.} procedures, like exit
14:02:01krux02or raise
14:02:15miran@kaushalmodi: nope
14:02:19krux02functional languages call this the Nothing type
14:03:17miranyou get "Error: expression '1' is of type 'int literal(1)' and has to be discarded"
14:04:09*krux02 quit (Remote host closed the connection)
14:04:50miranthat's when i change `second` to use `result =`, but when i change `third` i get a different message: "Error: not all cases are covered"
14:05:33miranso there is something going on, depending if you evaluate string or char!?
14:12:49FromGitter<bevo009> anyone? this is the description in module system: ⏎ ⏎ `proc writeLineTy (f: File; x: varargs[Ty, `$`]) {..}` ⏎ ` writes the values x to f and then writes "\n". May throw an IO exception.` [https://gitter.im/nim-lang/Nim?at=5b4b5661582aaa63076ceecc]
14:15:16FromGitter<kaushalmodi> bevo009: No idea.. should have worked (about newline after line when using `writeLine`)
14:16:36FromGitter<kaushalmodi> miran: Whether that non-exhaustive case is a bug or not, I think it would be great to open an issue and put your snippets and outputs there. Something needs to be fixed: doc or code.
14:17:02miranagreed. but that will happen after the world cup final :)
14:17:23FromGitter<bevo009> lol
14:17:36Araqdid you read the docs? :P
14:18:06Araqkrux02: that has been implemented
14:18:51*Perkol quit (Remote host closed the connection)
14:19:35dom96ugh, why did my merge fail? :/
14:21:53*donlzx joined #nim
14:22:08*fastrom quit (Quit: Leaving.)
14:23:58FromGitter<kaushalmodi> miran: understood. That's why I am not on computer right now
14:24:03FromGitter<kaushalmodi> Watching the pre finals
14:35:19*miran quit (Ping timeout: 260 seconds)
14:35:42FromGitter<bevo009> I can get a newline using system.writeLine to a notepad++ file
14:35:48FromGitter<bevo009> But not to notepad
14:36:18FromGitter<bevo009> What's the trick with notepad I wonder
14:37:07Araquse \p to create a Windows newline
14:37:39FromGitter<tim-st> I think "\n" should do it on all systems
14:37:49FromGitter<tim-st> this is how python does afaik
14:39:01FromGitter<bevo009> @Araq thanks mate, that worked
14:39:47Araqand stop using Notepad, it's terrible ;-)
14:40:02dom96tim-st: it doesn't work that way in Python
14:40:24FromGitter<bevo009> I've got them all...notepad, notepad++, sublime
14:40:38FromGitter<bevo009> notepad is default on windows though for other users
14:40:58Araqwindows 10's notepad can handle Unix newlines though
14:41:15FromGitter<tim-st> dom96: how does it work in python then?
14:41:21Araqso it works for "other users" too.
14:41:54dom96tim-st: It's line feed on all systems
14:42:48FromGitter<tim-st> I'm pretty sure when I write print("abc\nabc") this will writes a new line in python on every system that exists for python
14:43:21dom96https://docs.python.org/2.0/ref/strings.html
14:43:41FromGitter<bevo009> So `\p` always has to be added manually to work correctly on a pc using notepad then?
14:43:43FromGitter<tim-st> that's python 2.0
14:43:54FromGitter<tim-st> I started using python 2.7
14:44:20dom96...
14:44:30FromGitter<tim-st> also I think line feed makes a new line?
14:44:40dom96It does
14:44:53dom96Windows uses a different character to delimit newlines in files though
14:45:18FromGitter<tim-st> will try that now
14:45:20dom96https://en.wikipedia.org/wiki/Newline#Representation
14:45:44AraqPython's IO layer does the translation of \n to CR-LF.
14:45:50Araqon Windows.
14:46:04Araqand we don't have an IO layer to speak of :P
14:46:07FromGitter<tim-st> so it works on every system as I said
14:46:12FromGitter<tim-st> (in python)
14:46:29Araqyes, but it works differently \n is always just LF in Python too.
14:47:11FromGitter<tim-st> ok
14:56:22FromGitter<kaushalmodi> Araq: So `\p` should be used instead of `\n` in `writeLine` and such?
14:56:35FromGitter<bevo009> If I use `\p` to create a newline on notepad, it creates 2 newlines on notepad++
14:56:49FromGitter<bevo009> Anyway to get the same result on both?
14:57:03Araqdon't use writeLine with \p
14:57:09Araquse 'write' with \p
14:57:43Araqkaushalmodi: no, users should use a real text editor or update their OS
14:58:54AraqCR-LF sucks on Windows too, need special logic to compare these files in unit tests etc yadda yadda
14:59:32dom96Notepad is even getting support for the Unix newlines
14:59:38FromGitter<bevo009> perfect boss
14:59:42FromGitter<kaushalmodi> Araq: I was just suggesting that for better Windows support (I don't use Windows)
14:59:56FromGitter<bevo009> that works fine
15:00:10FromGitter<kaushalmodi> `writeLine` works as is on my system as `\n` is good for GNU/Linux systems
15:00:37Araqit's good for Windows too, but not for crappy notepad
15:01:17FromGitter<bevo009> fyi I also compiled it on ubuntu, and notepad had the same problem as a windows compilation
15:01:50Araqnotepad on Ubuntu?
15:01:58*nsf quit (Quit: WeeChat 2.1)
15:02:26FromGitter<bevo009> ubuntu subsystem, same machine (pc)
15:03:58Araqdom96: I thought it already got that support
15:04:15dom96perhaps
15:04:50FromGitter<bevo009> My ubuntu subsystem isn't the latest one
15:06:14FromGitter<bevo009> not the 'creators fall update' or whatever it's called
15:08:40FromGitter<bevo009> anyhoot thanks for fixing that...I'll check the unix line endings on notepad again when I update my subsystem
15:14:41*ftsf quit (Ping timeout: 248 seconds)
15:28:23stefanos82off topic: I wanted to ask people in here; has anyone of you gone through an existential-career / path crisis even before? If yes, how did you deal with it?
15:34:05FromGitter<bevo009> damn! good game
15:37:09*skrylar joined #nim
15:40:02*edcragg quit (Quit: ZNC - http://znc.in)
15:40:19*edcragg joined #nim
15:59:03stefanos82Araq: which file should I look to see how object is implemented?
15:59:36Araqobject?
15:59:46stefanos82yes, when we say type something = object
16:00:13stefanos82I want to see how object is implemented
16:14:01*rauss joined #nim
16:14:09*rauss quit (Client Quit)
16:27:10FromGitter<tim-st> how can I get the tag name that is around the current xml tag like <b><span>...</span></b> when I'm in span and want to know "b"?
16:27:28FromGitter<tim-st> I saw `child` but need parent or so
16:36:20*Ven`` quit (Read error: Connection reset by peer)
16:38:49*Ven`` joined #nim
16:44:38Araqstefanos82: it's mapped to a C 'struct'
16:44:51Araqin compiler/ccgtypes.nim
16:57:05stefanos82thank you Araq
17:02:18stefanos82Araq: those who would like to contribute, where should they look at so they can read more about the project development, the files' order they should read to get a rough idea?
17:03:08Araqhttps://nim-lang.org/docs/intern.html
17:04:06stefanos82perfect! thank you Araq
17:04:55Araqstill seems reasonably up-to-date
17:06:22FromGitter<bevo009> My code compiles, but how do I get rid of this warning? I need to insert {.base.} somewhere? ⏎ `type.nim(4, 8) Warning: use {.base.} for base methods; baseless methods are deprecated [UseBase]` ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b4b7f0e95e03e3d7b4ebb9a]
17:07:15skrylarcorrect, you have to mark methods of the base type with base
17:07:26FromGitter<Bennyelg> Greeting to France
17:07:31FromGitter<bevo009> example?
17:07:32FromGitter<Bennyelg> For taking the World Cup
17:07:53skrylartype foo* = object {.inheritable.} \n method dance(self: var foo) {.base.}
17:09:05FromGitter<bevo009> Is it just the first line I need to change?
17:09:12FromGitter<Bennyelg> `method` is not a deprecated keyword ?
17:09:38skrylarbevo009: the base method yes, overrides no
17:09:41FromGitter<bevo009> I got it from a 2016 video, so maybe
17:10:43skrylaryou know how in c++ you mark a function as virtual
17:10:48skrylaror in java you use override
17:10:59skrylarits like that but the origina lcall is {.base.} and the overrides aren't
17:11:21FromGitter<bevo009> I'm a bit of a noob, so how exactly should I rewrite that first line?
17:11:35skrylarhttps://nim-lang.org/docs/manual.html#multi-methods
17:12:20*donlzx quit (Quit: Leaving)
17:14:23FromGitter<Bennyelg> is static dispatch referring to if the compiler know the types in compilation ? and dynamic is when it needed to infer it dynamiclly ?
17:14:53skrylarstatic dispatch means the compiler knows exactly which call to use, dynamic dispatch means it has to check the object's type at runtime
17:15:36FromGitter<Bennyelg> yea this is what i ment
17:15:37FromGitter<Bennyelg> thanks
17:16:25FromGitter<bevo009> cheers, I worked it out, the warnings go with this ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b4b8169866e0c6b15abfc81]
17:17:29skrylarwhy is age a method?
17:17:31FromGitter<Bennyelg> why not just using proc
17:18:12skrylarBennyelg well `speak` being a method makes sense, another type of animal would speak differently
17:18:36FromGitter<bevo009> yeah there's other animals in the rest of the code
17:18:40skrylaran interface that accepts the animal type would not be aware of other animal types, so it has to use dynamic dispatch to support ex. giraffe
17:19:52Araqskrylar: FRP is not for me.
17:20:04Araqunsurprising, I know.
17:20:14skrylaris this due to an implementation related trouble or a conceptual one
17:24:10FromGitter<Bennyelg> FRP ? =
17:24:21FromGitter<Bennyelg> @Araq you have a unique language
17:24:26FromGitter<Bennyelg> too many shortcats
17:24:36FromGitter<Bennyelg> cuts
17:26:17Araqskrylar: I think the cyclic dep problem in FRP is unsolved
17:26:34*find0x90_ quit (Quit: find0x90_)
17:26:43Araqand "randomly insert 'onNextTick' annotations" is not something I enjoy doing
17:27:48skrylari'm not particularly familiar with the onNextTick problem
17:28:14Araqplus I'm a fan of immediate mode UIs, so for me FRP solves the problem in an overly complex way
17:29:08Araq"The only obstacle to topological ordering is the presence of cycles in the graph. Cyclic dependencies without delays would, however, be ill-defined. Flapjax therefore expects that every cycle is broken by at least one delay (either the primitive delayE or a higher-level procedure, such as integration, that employs delays). This restores the delay-free sub-graph to a partial order." from flapjax's docs
17:31:37AraqBennyelg: FRP = Functional reactive programming.
17:32:24skrylarI guess that's one way to solve it. I was reading/watching things from reflex and they were suggesting *not* using delays
17:33:44FromGitter<kayabaNerve> My Nimble package was published :D
17:33:59FromGitter<kayabaNerve> Have I succeeded at life now?
17:34:45skrylaryes
17:34:56FromGitter<kayabaNerve> BTW does the stdlib use new, init, or a mix?
17:35:26FromGitter<kayabaNerve> Because I think it's newSeq/initTable, right? Do we plan on standardizing that or offering either?
17:38:39skrylarmy guess is nobody has gotten around to doing it
17:38:58skrylarfilestreams still use get_position and set_position for instance
17:39:26*find0x90 joined #nim
17:42:43FromGitter<GULPF> @kayabaNerve new is for ref types, init is for non-ref types
17:45:42FromGitter<GULPF> for example both newTable and initTable exists, with different meaning
17:46:08FromGitter<tim-st> can I also use new for non ref types?
17:46:15FromGitter<tim-st> I think that sounds better
17:47:08*skrylar used to use open/close/make/free for that, although i don't think anyone else ever did
17:47:28skrylarmake/free being the malloc/free variants, and open/close being the init/deinit for pre-existing memory
17:47:44FromGitter<tim-st> I also used new for tuples
17:47:53FromGitter<GULPF> better to use init for consistency with the stdlib imo. there's been talks about changing the convention though, see #7832
17:49:47FromGitter<tim-st> I always found initTable and initSet are names that could have better names
17:50:33FromGitter<tim-st> btw I tried to use `destroy` but it doesnt work, it wanted some specific code signature which I hadnt
17:50:56FromGitter<tim-st> I just wanted to use it like in python to call at destroy what I want
17:50:59*vivus joined #nim
17:51:36FromGitter<tim-st> or which types can have destructurs? object too?
18:00:57*Ven`` quit (Ping timeout: 240 seconds)
18:25:37*nsf joined #nim
18:28:59*Ven`` joined #nim
18:29:36*miran joined #nim
18:33:12FromGitter<Vindaar> uggh to myself. sometimes RTFM really is the best way...
18:36:18FromGitter<tim-st> I now realized this like the 10th time over several monthes: something is really wrong with counTable.sort, it's really slow
18:36:45FromGitter<tim-st> it feels like bubble sort
18:36:56*find0x90 quit (Quit: find0x90)
18:38:21FromGitter<kayabaNerve> @skrylar Isn't there a Nim language thing where get_p and getP both thing? Part of the... ah hell, what's it called. The syntax can be a b c or b a c
18:38:38FromGitter<kayabaNerve> For some reason I feel that's part of it too
18:39:00*find0x90 joined #nim
18:39:03FromGitter<tim-st> lol: `# we use shellsort here; fast enough and simple`
18:39:11FromGitter<kayabaNerve> Of course, it's not case sensitive for some reason, so the question isn't if _lower works as Upper, but rather if _ is needed
18:39:11FromGitter<tim-st> no, it's not fast at all
18:40:17FromGitter<kayabaNerve> !eval proc get_lower() = echo "True"; getLower()
18:40:19NimBot<no output>
18:41:12FromGitter<kayabaNerve> That works if you use a newline over a semi colon
18:41:29FromGitter<kayabaNerve> I'm guessing the proc call is treated as part of the proc itself
18:41:44FromGitter<kayabaNerve> *Or rather it is.
18:42:06FromGitter<kayabaNerve> That said, I have no idea how to handle it the other way. skrylar
18:45:19FromGitter<kayabaNerve> And of course, something shouldn't be acceptable as defined if other features allow it to be ok. The definition itself should be ok. I'm just commenting it balances out.
18:51:25*Ven`` quit (Read error: Connection reset by peer)
18:52:34*Ven`` joined #nim
18:56:02stefanos82is there a particular reason why the search in documentation page is case-sensitive?
18:56:43stefanos82I'm searching for concept and should have returned Concepts back from Generics
18:56:47stefanos82it doesn't... :/
18:57:10*Perkol joined #nim
18:58:03FromGitter<Vindaar> I don't think it's case sensitive. It's just that some things simply don't pop up in the search bar
18:58:25stefanos82well, some times I need to use capital letters to "fool" the searching to return them
18:58:28FromGitter<Vindaar> I personally always just Ctrl-f on https://nim-lang.org/docs/theindex.html
18:58:45stefanos82then I try again with the same keyword, all lowercase this time and returns it normally
18:58:57stefanos82yeah, now I use the Ctrl-f myself as well
19:01:18Perkolhttps://bpaste.net/show/ca35ab78de1b I want to pass poDemon to my comand, but it gives me errors type expected
19:04:05FromDiscord<awr> what algo does nim std library use for non-crypto hashes
19:09:37FromGitter<tim-st> Araq: I updated countTable.sort to use system.cmp it's now much quicker, is it ok to also sort keys after values (which I have currently implemented) or has it downsides?
19:10:27FromGitter<tim-st> sry I meant to use algorithm.sort
19:10:47stefanos82question: why when I place --hints:off inside my project/src/nim.cfg still prints one hint "Hint: used config file '/etc/nim.cfg' [Conf]" and when I type it in nim c --hints:off src/foo.nim, it turns hints completely? What am I doing wrong?
19:11:10stefanos82*turns hints off completely
19:11:23miranstefanos82: i find that behaviour nice - it reminds me of my custom .cfg
19:12:06stefanos82personally I don't like it
19:12:26stefanos82when I disable hints, I want them disabled completely
19:12:45FromGitter<alehander42> nsz
19:13:13miranwell, you disable them by --hints:off. and that warning reminds you that *all* various settings from your .cfg are used
19:13:24miranbut i get your point
19:13:37stefanos82yeah, but why does not do so with nim --hints:off?
19:13:57FromGitter<tim-st> can someone pull request my code changes I dont have the things installed?
19:13:59miranbecause you manually and on purpose turned off all hints
19:14:09stefanos82nearly all miran
19:16:41*arecacea1 quit (Remote host closed the connection)
19:17:05*arecacea1 joined #nim
19:18:41stefanos82miran: it seems I cannot disable Conf hint from inside src/nim.cfg for some reason
19:19:12FromGitter<tim-st> is >(a, b) defined for all types?
19:19:37miranwhy is that one line so problematic for you? :)
19:20:31FromGitter<Vindaar> @Perkol: you need to hand the option like so: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b4b9e7e582aaa63076dcc62]
19:20:36miran@tim-st i would say it isn't
19:21:04FromGitter<tim-st> how can I findout?
19:21:13Araqstefanos82: wasn't that fixed on devel?
19:21:19FromGitter<tim-st> when compiles ?
19:21:22miranby searching the index?
19:21:32FromGitter<Vindaar> the `set[ProcessOption]` defines a type. A set which contains `ProcessOption` values. You want to hand a set with a specific value though
19:22:05stefanos82Araq: ah I use version 0.18.0 that comes with Debian testing 64-bit
19:22:25FromGitter<tim-st> I have this code, I want to sort keys too if type is sortable: https://gist.github.com/tim-st/9522522feb1a9684ed5ea8634b3eef22
19:23:02miranstefanos82: Araq is right, no such message in devel
19:23:13stefanos82miran: cool.
19:23:54*Vladar quit (Quit: Leaving)
19:24:18FromGitter<tim-st> Araq: how should I do the check if type is comparable? or should I just skip key comparison?
19:27:33Araqvia system.cmp
19:27:52Araqwell, you need to ensure it's an "open symbol"
19:28:31FromGitter<tim-st> should I use when compiles?
19:28:58FromGitter<tim-st> I mean does system.cmp work for all types?
19:29:06FromGitter<tim-st> I currently use system.cmp for it
19:29:51FromGitter<tim-st> it's a generic type
19:30:32*Vladar joined #nim
19:32:27FromGitter<tim-st> the nim docs doesnt say if == works for all types
19:33:18Araquse 'mixin cmp' in the generic proc body
19:33:28Araqas the first statement
19:33:35Araqand then call 'cmp'
19:36:19FromGitter<tim-st> I have no idea... like this? https://gist.github.com/tim-st/9522522feb1a9684ed5ea8634b3eef22
19:39:48stefanos82Araq: OK, I removed my 0.18.0 and installed the latest git version. Indeed I don't have any problems now with --hints:off
19:39:55Araqt.data.sort(cmp=cmpCountTablePair[A])
19:40:00Araqbut yes
19:40:15FromGitter<tim-st> why is the [A] needed
19:40:25FromGitter<tim-st> and is mixin at right place, and what does it?
19:40:28stefanos82I have noticed though that nim c src/foo has added an extra 0.10s on compilation for some reason :/
19:40:43FromGitter<Bennyelg> my friend which used scala for the past 5 years is now started to switch his projects to Nim :O
19:40:51FromGitter<Vindaar> nice!
19:41:29*find0x90 quit (Quit: find0x90)
19:42:42stefanos82Araq: next time I fetch the latest repo updates, should I repeat the https://github.com/nim-lang/Nim#readme 's compiling procedure?
19:45:48Araqgit pull && koch boot -d:release
19:45:57Araqis how you can update Nim.
19:45:58stefanos82awesome
19:46:13skrylar@kayabanerve yes everything becomes lowercase without snakes (except the first character, because socialism happened)
19:47:14FromGitter<Bennyelg> @Araq why don't you put this as a core json parse lib on nim ? ⏎ https://github.com/Araq/packedjson
19:48:59Araqwe also need high quality Nimble packages :P
19:49:15FromGitter<tim-st> Araq: OrderedTable.sort also does use some custom slow algo?!
19:50:32Araqtim-st: it's not "custom", it's usually shellsort :P
19:51:08Araqwhy? because Sedgewick said so.
19:51:28FromGitter<tim-st> that was slowing very much down
19:51:34FromGitter<tim-st> is my code correct now? https://gist.github.com/tim-st/9522522feb1a9684ed5ea8634b3eef22
19:51:49FromGitter<tim-st> is mixin at correct place? I try to fix the other sort too
20:10:11stefanos82out of curiosity Araq, when you first released Nim back in 2005, was it something that you created in a short period of time or what it something that came after years of personal R&D?
20:13:29*Perkol quit (Quit: Leaving)
20:15:49Araqstefanos82: years of research.
20:15:58stefanos82I thought so lol
20:16:20stefanos82you should definitely release a book about it one day
20:19:20dom96Araq: Didn't you only release it publically in ~2008?
20:19:37Araqdunno
20:22:05FromGitter<tim-st> Araq: for the OrderedTable.sort I wrapped proc in proc because it's easier there, is it ok? https://gist.github.com/tim-st/9522522feb1a9684ed5ea8634b3eef22
20:22:38FromGitter<tim-st> ah, needs mixin again
20:23:45FromGitter<tim-st> no, the proc is manually passed so it should be ok...
20:25:34stefanos82dom96: based on Wikipedia (which I don't know whether it's true or false), it says Araq started the initial development in 2005 and in 2008 was the first version of Nim that was compiled with Nim itself.
20:27:05Araqtim-st: the tests will tell you if you got it right
20:27:24FromGitter<tim-st> you mean the travis? :0
20:27:29Araqstefanos82: yeah, 2005 or 2006, but it was released then
20:28:14Araq*was not
20:30:59FromGitter<tim-st> what is the command to run all tests on my pc?
20:32:07dom96http://web.archive.org/web/20110704041631/http://force7.de:80/nimrod/
20:32:18dom962008-06-22 "This page is finally online!"
20:32:27dom96I'd say that's the first time it was publically released
20:33:25FromGitter<tim-st> "Roadmap to 1.0"
20:34:50stefanos82dom96: I can confirm this with git log --reverse
20:35:30stefanos82anyhow, this project is really awesome
20:36:24*krux02 joined #nim
20:37:57*miran quit (Ping timeout: 240 seconds)
20:38:10*miran joined #nim
20:38:51FromGitter<Bennyelg> very nice
20:44:09*miran quit (Quit: Konversation terminated!)
20:44:22Araqdom96: uh, don't remind me, lol
20:49:18stefanos82feels like it was yesterday
20:49:48Araqdefinitely. not.
20:50:02stefanos82I still have vivid memories from school...I can't believe it's been nearly 20 years now
20:50:45FromGitter<Bennyelg> @Araq where do you work these days?
20:54:47Araqliving from donations. working on Nim fulltime.
20:56:20*rockcavera quit (Remote host closed the connection)
20:56:40stefanos82I wish I knew what to do with my life Araq
20:56:58stefanos82I live a nightmare for 3 years now and I feel trapped.
20:57:29FromGitter<Bennyelg> @Araq Wow, thought you are working on google or something big
20:57:47AraqI'm not good enough for G :-)
20:57:49FromGitter<Bennyelg> An summit soon ?
20:58:05FromGitter<Bennyelg> @Araq You probably are ;]
20:58:42Araqstefanos82: burned out? join #nim-offtopic
20:59:09krux02is nim-offtopic even active?
20:59:19Araqyeah.
21:02:42FromGitter<tim-st> Araq: good that've run the tests using koch, there were two things that `nim check hasnt found` :\
21:02:56FromGitter<tim-st> 1) `nim check`
21:04:12*find0x90 joined #nim
21:05:06FromGitter<Bennyelg> Someone read this?
21:05:07FromGitter<Bennyelg> https://mail.python.org/pipermail/python-committers/2018-July/005664.html
21:05:17FromGitter<Bennyelg> Python core dev is leaving
21:05:36Araqyeah, we know
21:05:55FromGitter<Bennyelg> how old is he ?
21:06:12krux02 31. Januar 1956
21:06:17krux02that is his birthday
21:06:47*nsf quit (Quit: WeeChat 2.1)
21:07:02FromGitter<tim-st> wow didnt know that
21:07:05stefanos82he's not leaving, he just withdrew from his Benevolent Dictator For Life position. He will remain as part of the core
21:07:06FromGitter<Bennyelg> he need rest hehehe
21:07:10FromGitter<tim-st> but I'm not reading this reddit things
21:09:19krux02in two weeks Guido van Rossum will be back because he is bored.
21:09:53FromGitter<tim-st> maybe he switches to nim, who knows?
21:10:13Araqmore importantly, he needs to remove := from Python.
21:10:39krux02You know the episode of Spongebob where Mr Crabs sells his restaurant and then after Lunch he did everything he never had time to do it. And he wanted the Restaurant back.
21:11:04FromGitter<tim-st> the last time I watches this is like ten years ago
21:11:12Araqhmm omg, I think I know this episode...
21:11:30krux02Araq: is := that = that can be used in an expression?
21:11:40Araqyeah
21:11:44FromGitter<Bennyelg> I cant belive they add := in python
21:12:08FromGitter<Bennyelg> gland I sticked 2.7.15 and now moving or at least trying moving to nim
21:12:12FromGitter<Bennyelg> porting *
21:12:19FromGitter<Bennyelg> glad*
21:12:44krux02Bennyelg: I don't think that sticking to old pything is anything that you can be pround of.
21:13:00krux02it's not like that you ever have to use new features
21:13:40krux02sometimes it's just not worth switching to a new technology, because the benefit isn't there.
21:13:47FromGitter<Bennyelg> I wrote and something still write py3.6 code
21:14:07FromGitter<tim-st> btw why is guido called a "python dictator"?
21:14:17FromGitter<tim-st> isnt it his language?
21:14:29krux02because that is his official position in the python community.
21:15:03krux02But when he is/was a dictator I don't get why he had so much struggle with getting a decesion thgouh.
21:15:07FromGitter<tim-st> yes, but this sounds like something bad, when I type his name in google every news page writes this as title
21:15:15krux02I mean isn't that the one thing a dictator can do fast?
21:16:16krux02I don't know. Befere anybody wrote about that here in the chat, I didn't know about him at all.
21:16:24FromGitter<tim-st> ah, now I read it's a typical name for people around programming languages
21:16:35FromGitter<tim-st> Araq is this person too?^^
21:16:57krux02yea Araq is our dictator.
21:17:23krux02The only difference to a dictatorship is, that we can just leave if we don't want to stay any longer
21:17:29FromGitter<Bennyelg> Breaking News: (2018-07-16) ^ ⏎ ```"Dictator Araq is quiting Nim-lang developing to be core Go dev"```
21:18:10krux02But a leading commitee of smart people is really very important for a Programming language to stay successfull.
21:18:35FromGitter<tim-st> I think, he also did it because python is good enough
21:18:43FromGitter<tim-st> for the things it aims
21:19:48AraqBennyelg: well one should never say never, but ... never gonna happen.
21:20:41krux02Well I would say it is just a matter of how much money they offer you.
21:20:49FromGitter<Bennyelg> Hehehe I'm sure
21:21:31FromGitter<Bennyelg> @krux02 I guess it wont accept any money. nim is like his baby
21:21:46stefanos82like his baby?
21:21:52stefanos82it IS his baby!
21:22:15FromGitter<Bennyelg> hehe what ever my english is suck
21:22:48krux02I just remember Notch complaining about how hypocritical it was for Oculus Rift to sell themself to Facebook after the successful kickstarter instead of staying independent. And then He sold Mincreft not a long time after that to Microsoft.
21:23:16Araqwe sold NimForum to Microsoft.
21:23:53FromGitter<Bennyelg> hehehe
21:40:21*jamesroseman joined #nim
21:40:43*xet7 joined #nim
21:48:03*find0x90 quit (Quit: find0x90)
21:52:37skrylar*to be fair* notch did not take kickstarter money and run
21:53:02skrylarhe offered a functional [lol] product that people could buy and use, and then after years of shipping sold it off
21:53:19skrylarocculus used public funds to prep a sell-off to a whale and never actually shipped a product
21:53:36skrylar[SDKs do not count]
21:54:08skrylarpeople basically got duped in to paying to debug a product for zuck to sell to them :P
21:55:17krux02skrylar: Notch always promoted that Minecreft will release it's source after the selling of the game has settled.
21:55:46*xet7 quit (Quit: Leaving)
21:56:26krux02skrylar, I used the official sdk for oculus before it was sold to Facebook.
21:56:34krux02And I used it to develop on Linux.
21:56:57krux02After it was sold to FB, Linux support was quickly dropped.
21:57:56krux02to be honest, fb is the last company that I would want a VR experience from.
22:00:52*jamesroseman quit (Ping timeout: 244 seconds)
22:01:00skrylarminecraft's source has been released indirectly :)
22:01:15skrylarthe mod community reverse engineered it all :^)
22:01:36krux02Platforms like youtube, facebook and other anti social notworks, are incretibly harmful to people.
22:01:51skrylarnow im getting flamed out for dissing immguis again
22:02:09krux02I know
22:03:24krux02but the name "Minecraft Java Edition" tells me a lot about Microsoft and their plans on the future of minecraft.
22:03:41krux02if "frameing" is a keyword to you.
22:04:08krux02Java is usually related to bad things like this annoyibg "java has an update" on Windows.
22:04:16skrylari still haven't been sold on the immgui craze. people mention there are state of the art caching/identity reuse algorithms but that sounds no less complicated than wiring event graphs to retained mode
22:04:49krux02skrylar, are you talking to somebody I don't see?
22:04:56krux02I only see irc chat
22:05:38*Vladar quit (Quit: Leaving)
22:05:47skrylarthe immgui thing is in another network yes
22:05:56skrylarbut immguis get talked about here too
22:06:33krux02what network?
22:06:44skrylarmastodon
22:06:55krux02I am confused
22:07:20krux02how are you able to see mastodon and I am not?
22:07:34krux02do mastodon people see me?
22:07:54krux02am I in a parallel universe
22:08:09skrylarbecause ones a twitter clone and we don't have a bot that forwards osocial/activitypub to irc?
22:09:09krux02I don't use twitter, and I kind of don't want to.
22:09:38krux02it is yet another of these anti social networks that bring out the worst in humans.
22:11:24skrylargnusocial, mastodon and pleroma are based around osocial/activitypub, so the're more like diaspora than facebook (self hostable, federated, etc)
22:12:43krux02I believe in IRC now.
22:12:46skrylari guess i'll have to go try and find these supposed "efficient immguis"
22:12:51*jamesroseman joined #nim
22:12:56krux02IRC is big enough to stay relevant
22:13:09krux02you know network effect.
22:13:10skrylarirc could use a couple extensions to be honest
22:13:31krux02yes, but as far as I have heared. They are being developed on.
22:13:38skrylarbiggest win with matrix over irc is that user authentication and history are codified
22:14:03krux02And IRC needs some streamlined clients.
22:14:27krux02the important things more visible, the less important things less visible
22:15:32krux02for example, why do I need to know the server command /join?
22:15:40krux02why don't I just get a channel list
22:15:41*Ven`` quit (Quit: q+)
22:15:56krux02I mean /join is nice
22:16:04skrylar'cause all the money is in proprietary lock-in crap, and not making generic irc clients
22:16:05krux02sometimes I am just guessing channel names
22:16:28krux02skrylar, that is not entirely true
22:16:58krux02even though irc decreased in size a lot over the last 10 years, Freenode actually grew in size.
22:17:42krux02for open source projects it becomes more and more a common thing to have a freenode chat room
22:18:00skrylari said money, not users
22:18:12skrylarprogrammers are more likely to do public unpaid work than artists
22:18:21*find0x90 joined #nim
22:18:26skrylarand the artists are who make the clients pretty / more usable
22:19:03krux02well, the problem is in the network effect, and the non-caring in the average user abot how bad it actually is when a single company owns a communication network with all the messages sent
22:19:57skrylarthomas hobbs :)
22:20:07krux02who is thomas hobbs?
22:21:09skrylara deceased philosopher who wrote about things like mankinds spring-like attachment to central authority
22:21:18krux02it is the same with windows. The average user does't care how bad it is that Microsoft owns basically the entire Desktop World.
22:22:01krux02They just complain "Ugh... I don't like this new style, I stick to Windows 7"
22:22:25skrylarhttps://tvtropes.org/pmwiki/pmwiki.php/Main/HobbesWasRight is the short version, but there's a lot of reality to it
22:23:23skrylarwell, i was 'happy' as a mac user. but i don't have the income to sustain the constant deprecation and recycling of their hardware
22:23:37skrylarthe other alternative is what? plan9?
22:24:24krux02plan9 is one alternative
22:24:28skrylarthere exists a populace who is not married to windows but the alternatives are not sufficiently acceptable
22:24:56krux02There is Linux, and Linux is actually widely adopted. It is just not in the average User.
22:25:19skrylarex. omnifocus does the whole gtd / project management stack and then cross integrates with ical which can cross integrate with a phone or other calendar systems and this doesn't require me to drop to CLI even once
22:25:28skrylaron linux that stack is a good joke
22:26:00krux02skrylar, it is not about usability. Usability is something that can be fixed over time when people care enough.
22:26:34skrylarusability is part of the core loop or it's not a factor at all :p
22:27:01skrylari mean we literally use reST instead of raw groff because usability no?
22:27:18krux02I have no idea what you use
22:27:21krux02and I don't use rest
22:27:32skrylarnim semiofficially does
22:27:37krux02I also don't use groff, because I don't even know what it is.
22:27:51skrylargroff is gnu troff, which is what produces man pages
22:28:13krux02interesting
22:28:33krux02it would be nice, if man could actially open links in the "see also" section
22:29:00krux02that really sucked on cli man.
22:29:05*jamesroseman quit (Ping timeout: 240 seconds)
22:29:12skrylari don't want to sound super harsh and etc etc, but ever so often i go to check simple technical questions that show up in business but not FOSS concerns. like "how do i ship contextual help?"
22:29:18krux02but I use woman now (emacs) and it is all so much better
22:29:32skrylarFL Studio takes you to contet help from basically anywhere from F1, and it tells you how to use whatever crap you're looking at
22:29:56skrylaron windows this is a single winapi call to pop open the program's CHM file at a given anchor
22:30:21krux02chm?
22:30:27skrylarcompiled help manual
22:30:29FromGitter<Vindaar> holy crap, TIL krux02. Why did I not know about WoMan until this minute? :D
22:30:48krux02I don't know
22:30:49skrylarwindows/microsoft help is basically html files with a special table of contents and index blob that it compiles in to a zipped up thing.
22:30:54krux02you are welcome
22:31:15skrylarosx also has something like this, you can do a cocoa call to trip the help file
22:31:37krux02interesting
22:31:41skrylarlinux just assumes you didn't include a manual and why would anyone ever do that, neither qt nor gtk support it
22:31:58skrylarfltk, amusingly, actually does have a help system
22:32:26krux02I actually do like man pages.
22:32:38skrylarthey are fine for simple cli applications
22:32:44skrylarthey are a non-starter for GUI applications
22:32:46krux02I am tired of the delay of web help pages.
22:33:21skrylari think my last report from a deep dive on linux help was "fuck it, no context help and just ship a PDF with it"
22:36:15krux02skrylar, what type of application did you want to ship with context help?
22:37:06skrylari have actually gotten bad reviews for releasing a simple desk timer without a context help system, so.
22:37:22skrylarapparently people expect everything to have them?
22:37:59skrylarhttp://www.softpedia.com/get/Desktop-Enhancements/Clocks-Time-Management/Dayslice-Lite.shtml
22:40:02krux02skrylar, I don't know what you think about it. But I just got asked if that website may collect my data. And I said "no"
22:40:08*arecacea1 quit (Remote host closed the connection)
22:40:16krux02it makes me really happy that I can actually say "so you may not"
22:40:33*arecacea1 joined #nim
22:40:38skrylari think that concept is silly
22:40:48krux02why?
22:41:02skrylarif i visit someone's house i don't get to sic the government on them and say "he wrote notes about me!!"
22:41:14*thomasross quit (Ping timeout: 260 seconds)
22:41:27krux02but it is the exact opposite
22:41:37krux02the website is in *MY* house
22:41:48*FromGitter quit (Read error: Connection reset by peer)
22:41:56*FromGitter joined #nim
22:42:15skrylarthey gather information that you made available to them; the servers not in your house, nor the router. unless they use spyware, they used nothing your system didn't gladly hand over
22:43:44krux02the website is shown in my house and runs on my computer. The javascript it runs should obey my house rules. And I prefer not to get tracked.
22:44:00skrylari would have just treated it like we do other kinds of data; fair use applies to personal / local use but you don't have th eright to give it / sell it to other parties
22:44:35krux02there is no "fair use" in Europe
22:44:44skrylarthat's your deficiency
22:44:54krux02that is American Law
22:45:33AraqLynx!
22:45:55krux02I don't fully understand the terms of Fair Use. But from what I know about it, I don't really like it.
22:46:32skrylarfair use is supposed to explicitly indicate that non-commercial use of goods is allowed; so making meme photos doesn't equate to a criminal/civil offense
22:46:33krux02if I understand it correctly it means, just because I am not making money of somethign I am allowed to use copyrighted material
22:47:01skrylaryou have to specifically do something with it, just making no money doesn't count
22:47:28krux02there is a difference on using meme, or uplaoding Lord of the Rings to Youtube.
22:47:38skrylarit allows ex. a news organization to take photos of something withotu permission, assuming the picture represents a public interest etc
22:48:09skrylarits not well enforced but it means well
22:48:19krux02so uploading "Lord of the Rings" with commentary is ok then?
22:49:05skrylartechnically yes, you can upload a movie as long as the entire work appears [to the judge] as a legitimate commentary
22:49:24skrylarif you clip from the film and talk over it or cite scenes as reference
22:49:54stefanos82question: when we print AST with dumpTree, should we expect a ! right next to Ident or not?
22:50:06krux02Here in the Germany we have the right to Quote. And then it is also required to actually bring the quote into some sort of context.
22:51:01krux02stefanos82, I think the `!` is a relic
22:51:43skrylarits a shame krux isn't in #nim-offtopic
22:52:06krux02hey I am back to topic already
22:52:23skrylar! had something to do with interned things didn't it?
22:52:34skrylarlike separating strings from symbols
22:52:58krux02not really
22:53:17krux02you can separete by the node kind
22:53:35krux02it was that there was the type NimIdent
22:53:53krux02and the nim Ident could be constructed with the `!` operator before a string
22:54:14krux02but that type completely disappeard and you create an identifier directly as a NimNode now
22:54:41stefanos82the reason I'm asking is because I'm in chapter 9 of "Nim in Action" and shows an exclamation mark right next to "*" and "+" operators, but I'm using the latest Nim from git repo and the printed AST does not include this character next to Ident
22:55:19krux02it got removed, because it has no purpose anymore
22:55:41krux02I think I did the change
22:56:49stefanos82I see
22:57:03*jamesroseman joined #nim
22:57:35stefanos82I have a weird behavior when I compile my code and I would like your feedback if you don't mind krux02
22:57:53krux02``Ident !"*"`` is now ``Ident "*"`` I think this is simpler to understand, less visual noise
22:58:03krux02no problem
22:58:08stefanos82when I run the standard nim c foo.nim, it compiles as expected, but you can see it delays just a bit to produce an output
22:58:30krux02what do you mean?
22:58:33stefanos82now, if I turn --hints:off and --verbosity:0, it feels like it executes immediately
22:59:11krux02I can only guess here, because I did not write the Nim compiler
22:59:22stefanos82when I time the compilation procedure with both time and /usr/bin/time -v, they produce similar results, even though it feels a bit slow
23:00:17stefanos82but with the aforementioned flags added in my local nim.cfg, it feels like it executes immediately, even though the time and /usr/bin/time -v produces the same times as above
23:00:21stefanos82and I feel confused
23:00:24krux02well that I can't explain at all, but I could explain why the one might be faster than the other
23:00:32*gangstacat joined #nim
23:00:49stefanos82krux02: something with open and close to print string messages?
23:01:31krux02I doubt it
23:01:50krux02I mean if you don't really print something that won't be the bottleneck
23:01:57krux02even if print would be slow
23:02:02krux02(print is always slow)
23:02:14krux02(on terminals)
23:03:10stefanos82OK, feel free to explain why case #1 could be faster than #2
23:03:19krux02the way a hint is implemented is a compiler is by checking the ast for a certain condition. And this would be done everwhere, on all nodes of the ast. So disabling them could reduce a lot of checks at compile time.
23:03:49krux02But if this is really the reason for the performance difference, I can't say with guarantee, that is just my guss
23:05:00krux02but if it really causes slower compilation speed, then it should be measreable
23:05:14stefanos82oh I thought --hints:off was to turn off the echoed messages during compilation
23:05:18stefanos82isn't that the case?!
23:05:43Araqgah, can't have generic compilerProcs. time to sleep.
23:05:51stefanos82rest well brother
23:06:00Araqannoying problem.
23:06:09stefanos82:)
23:08:22krux02stefanos82, I don't know exactly what --hints:off does, it could be that the messages are generated but just not printed, or it could mean that the compiler skips checking for conditions that would emit hints.
23:08:54stefanos82I hope Araq can answer this type of question tomorrow
23:09:05krux02well I have to go to bed as well
23:09:08krux02I am very tired
23:09:12stefanos82because if --hints:off means it complete turns off hints from doing their job, then I don't need this flag
23:09:17Araqit's the latter
23:09:37Araqthe compiler skips checking for stuff that would produce the hints
23:09:37stefanos82which latter?
23:09:41stefanos82oh shit
23:09:45stefanos82then I don't need this flag!
23:09:48Araqfor the expensive hints.
23:10:06stefanos82can't I get the checking without the string output messages?
23:10:12*FromGitter quit (Read error: Connection reset by peer)
23:10:16Araqhuh?
23:10:20*FromGitter joined #nim
23:10:28stefanos82when we compile it produces a series of Hints
23:10:50Araqif you disable the hints, why would the compiler need to check for them?
23:10:51*jamesroseman quit (Ping timeout: 240 seconds)
23:11:13stefanos82all I want is to disable their printing on terminal
23:11:36stefanos82but since they are doing something important to the compilation procedure, then I need them
23:12:10krux02stefanos82, they don't do anything important to the compilation process, that is why you can disable them
23:12:19krux02they only do something important to you the human.
23:12:42stefanos82ah cool then
23:14:20stefanos82in other words it's just like what its name says it does: it provides me with hints to let me know which modules are used with the current state of this compiled module
23:14:30stefanos82I hope I got it right
23:24:56stefanos82is there a way to turn off echo()'s newline?
23:28:28FromGitter<Vindaar> nope, for that use stdout.write
23:29:38*find0x90 quit (Quit: find0x90)
23:31:16FromDiscord<exelotl> would it be possible to improve the nim docs search? I often don't find what I'm looking for on there
23:32:09FromDiscord<exelotl> for example, I was wondering if `/` is suitable for integer division so I searched `integer division` and nothing came up
23:32:17stefanos82you are not alone on this one exelotl
23:32:20FromGitter<Vindaar> @exelotl: 1. there's this PR currently: https://github.com/nim-lang/Nim/pull/8260 and 2. https://nim-lang.org/docs/theindex.html plus Ctrl-f is useful :)
23:36:40FromDiscord<exelotl> oh neat @ both of those
23:36:47*donlzx joined #nim
23:38:52*NimBot joined #nim
23:40:27*krux02 quit (Remote host closed the connection)