<< 15-12-2014 >>

00:03:18*Boscop quit (Ping timeout: 258 seconds)
00:05:08enurlyxyeah, just happend i was searching too XD
00:05:14*Matthias247 quit (Read error: Connection reset by peer)
00:05:57*Trustable quit (Quit: Leaving)
00:07:50enurlyxAlso seems 32bit on 64bit is a bit tricky. Cause the pointersize
00:11:30*starless joined #nim
00:11:33*enurlyx quit (Quit: Leaving.)
00:12:51*flaviu joined #nim
00:24:05*BitPuffin joined #nim
00:26:23Varriountenurlyx: Yep, there's a whole section in the book I'm reading ("Windows Internals") that covers 32-bit emulation.
00:26:44VarriountOh, (s)he's gone...
00:28:46flaviupoor Varriount, reading about windows internals.
00:29:03Varriountflaviu: It's quite interesting. Also, a handy sleep aid.
00:29:35flaviuIt's quite unfortunate that I already have a backlog of sleep aids then.
00:29:42ldleworkI have sdl imported but getting app.nim(2, 16) Error: undeclared identifier: 'GetTicks'
00:29:48ldleworkhttp://nim-lang.org/sdl.html#GetTicks,
00:30:24flaviuldlework: gist the first few lines of app.nim
00:30:46Varriountldlework: Does the sdl library source actually match up with the documentation? If I recall correctly, that documentation is old.
00:30:48ldleworkhttps://gist.github.com/dustinlacewell/2c5b9c39ac8632fe9796
00:31:17ldleworkah
00:31:17*ciony quit (Ping timeout: 272 seconds)
00:31:19ldleworkgetTicks
00:31:54VarriountOh, victim of the renaming and case switch?
00:32:47*gokr quit (Ping timeout: 264 seconds)
00:52:45*gokr joined #nim
01:07:02*brson joined #nim
01:13:34*cir0x quit (Ping timeout: 245 seconds)
01:24:12*starless quit (Quit: WeeChat 0.4.2)
01:34:35VarriountAraq: You still awake?
01:42:17*flaviu quit (Read error: Connection reset by peer)
01:45:36*flaviu joined #nim
01:51:07*rpag quit (Ping timeout: 245 seconds)
01:52:49*starless joined #nim
02:01:51*willwillson quit (Ping timeout: 272 seconds)
02:04:36*quasinoxen quit (Quit: No Ping reply in 180 seconds.)
02:06:01*quasinoxen joined #nim
02:31:08*starless quit (Quit: WeeChat 0.4.2)
02:47:22*BitPuffin quit (Ping timeout: 245 seconds)
02:53:12*darkf joined #nim
02:53:18*bitcrusher1 joined #nim
02:54:51*bitcrusher quit (Ping timeout: 244 seconds)
03:23:37*flaviu quit (Ping timeout: 245 seconds)
03:28:05*brson quit (Quit: leaving)
04:09:51*cir0x joined #nim
04:14:51*cir0x quit (Ping timeout: 272 seconds)
04:53:52*EXetoC quit (Quit: WeeChat 1.0.1)
05:05:22*pwernersbach joined #nim
05:07:40pwernersbachWhat's the recommended way to break out bytes from an int?
05:08:54pwernersbachIn C I would cast to a byte pointer and dereference it, but I don't know how to in nim
05:14:28*johnsoft quit (Ping timeout: 250 seconds)
05:14:34*johnsoft joined #nim
05:43:19reactormonkpwernersbach, do you want bits or bytes?
05:44:14*BitPuffin joined #nim
05:45:32pwernersbachreactormonk: bytes
05:48:37*BitPuffin quit (Ping timeout: 250 seconds)
05:52:13reactormonkpwernersbach, you could just xor it out. Or still cast it.
05:52:56pwernersbachI'll go the cast route. How do I cast?
05:54:33reactormonkbtw, what do you need the code for?
05:54:44*boydgreenfield joined #nim
05:57:38reactormonkpwernersbach, http://nim-lang.org/manual.html#type-casts
06:01:15pwernersbachreactormonk: Okay, so "var w = cast[ref array[0..3, uint8]](addr(x))"?
06:01:43pwernersbachCasting to a managed array reference
06:33:09*pwernersbach left #nim (#nim)
06:44:38*bjz joined #nim
07:01:29*bitcrusher1 quit (Read error: Connection reset by peer)
07:24:48*cir0x joined #nim
07:26:17*kapil__ joined #nim
07:26:35*gour joined #nim
07:35:27*starless joined #nim
07:56:31*khmm joined #nim
07:59:19*khmm quit (Remote host closed the connection)
07:59:35*khmm joined #nim
08:04:35*cir0x quit (Ping timeout: 264 seconds)
08:07:50*darkf quit (Ping timeout: 258 seconds)
08:08:17*darkf joined #nim
08:18:22*BlaXpirit joined #nim
08:18:45*wan joined #nim
08:19:10*wan is now known as Guest92663
08:28:05*khmm quit (Ping timeout: 264 seconds)
08:31:07*khmm joined #nim
08:36:48*ARCADIVS joined #nim
08:39:35*cir0x joined #nim
08:50:09*Trustable joined #nim
09:04:55*milosn quit (Ping timeout: 272 seconds)
09:07:25*ciony joined #nim
09:27:36*milosn joined #nim
09:28:03*starless quit (Quit: WeeChat 0.4.2)
09:28:23*starless joined #nim
09:34:12*cir0x quit (Ping timeout: 260 seconds)
09:38:53*Guest92663 left #nim ("WeeChat 1.0.1")
09:38:59*cir0x joined #nim
09:39:05*wan joined #nim
09:39:29*wan is now known as Guest85541
09:39:37*Guest85541 quit (Client Quit)
09:39:54darkfhi - I have a: proc findBuffer(client: TClient, name: string): TBuffer where TClient contains a seq[TBuffer], but I want to return a mutable reference/pointer to the TBuffer somehow. I am just doing a linear search over the seq and returning one of the values. I can't say "addr buffer" because the "expression has no address". how should I best do this?
09:47:59*cir0x quit (Ping timeout: 272 seconds)
09:52:23*cir0x joined #nim
09:58:19darkfyeah this is incredibly confusing. all i want to do is take an object, iterate over one of its seq, and return a pointer to one of the items.
10:09:24*boydgreenfield quit (Quit: boydgreenfield)
10:13:57darkfis this a bug? https://bpaste.net/show/0f10c62aaf05 seems like weird behavior, iteration variables don't have addresses :/
10:14:35*ciony quit (Ping timeout: 272 seconds)
10:19:49*voldern1 is now known as voldern
10:24:24*BlaXpirit quit (Quit: Quit Konversation)
10:31:27*kapil__ quit (Quit: Connection closed for inactivity)
10:37:58*cir0x quit (Ping timeout: 256 seconds)
10:38:16*kapil__ joined #nim
10:41:17*khmm quit (Ping timeout: 264 seconds)
10:45:27*khmm joined #nim
10:48:35*ciony joined #nim
10:51:43*khmm quit (Ping timeout: 265 seconds)
10:54:12*milosn quit (Ping timeout: 250 seconds)
10:54:28*khmm joined #nim
10:56:08*starless quit (Quit: WeeChat 0.4.2)
10:56:17dom96darkf: you need to use mitems
10:58:32dom96hrm, I could've sworn that existed.
10:58:41*Ven joined #nim
11:02:58darkfdom96: maybe you should be the one to add it then :P
11:07:01dom96Araq: We definitely need a async await example on the front page.
11:13:47*cir0x joined #nim
11:22:03*willwillson joined #nim
11:31:06*ARCADIVS quit (Quit: ARCADIVS)
11:32:22*ciony quit (Ping timeout: 245 seconds)
11:39:47*flaviu joined #nim
11:41:52*ciony joined #nim
11:55:33*drewsrem joined #nim
11:55:42*drewsrem quit (Client Quit)
11:55:57*drewsrem joined #nim
11:56:04*flaviu quit (Ping timeout: 255 seconds)
11:56:12*drewsrem quit (Client Quit)
11:56:25*drewsrem joined #nim
11:57:22*repax joined #nim
11:57:38*repax quit (Client Quit)
12:14:55*ciony quit (Ping timeout: 272 seconds)
12:21:37*cir0x quit (Ping timeout: 265 seconds)
12:22:22*ciony joined #nim
12:26:18*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:44:03*ciony quit (Ping timeout: 272 seconds)
12:52:49*ciony joined #nim
13:34:13*BitPuffin joined #nim
13:36:15*gokr quit (Quit: Leaving.)
13:39:00*drewsrem quit (Quit: Leaving)
13:42:00*gokr joined #nim
13:42:00*gokr quit (Client Quit)
13:45:03*EXetoC joined #nim
13:53:39*gokr joined #nim
13:55:17*ciony quit (Ping timeout: 240 seconds)
13:59:56*ciony joined #nim
14:09:14*enurlyx joined #nim
14:13:46*gokr just ordered myself a real keyboard, kinda about time...
14:18:06BitPuffingokr: which one?
14:18:33gokrI tried finding a Ducky Shine 3, Tenkeyless but couldn't find it online with Nordic ISO layout
14:18:50gokrSo I ended up ordering a Filco Majestouch 2
14:19:15gokrKinda odd that I knew so little about keyboards :)
14:19:35gokrWhat do you use?
14:20:45gokrI did find the Ducky in Germany, but... I want my å and not ü
14:21:29BitPuffinI hear majestouch 2 is the best one with cherry switches
14:21:32BitPuffinso that's a good choice
14:21:39gokrPicked the brown switches
14:21:45BitPuffingokr: currently don't use a good one but I'm gonna order a unicomp keyboard
14:21:53gokrAh, springs! :)
14:22:17BitPuffinyep!
14:22:30gokrI saw a guy that had both the MJ2 and a Ducky shine 3 on youtube, and... in fact he preferred the ducky. But I guess both are pretty darn good.
14:22:49reactormonkNot sure why everyone like mechanical keyboards, they tend to have a rather hard keypress.
14:23:08gokrIt depends on the choice of switches, right?
14:23:22reactormonkProbably I've only used the hard ones
14:24:26gokrThis was the video: https://www.youtube.com/watch?v=vOGVso4xIBU
14:24:50BitPuffinreactormonk: because you know for sure when the key was pressed
14:25:01BitPuffinso you don't have to put more force in than necessary or press the key all the way down
14:25:25BitPuffinwith typical cheap ass keyboards you don't know, so chances are that you press harder than you need which causes fatigue
14:26:29gokrNow that I got so ... interested in this, I will probably just HAVE to get myself a ducky too. Get the itch unscratched.
14:27:10reactormonkBitPuffin, ah, I tend to have more problems with keyboards which require more keypress.
14:28:22BitPuffingokr: AND a unicomp!
14:28:26gokrHehe
14:28:38BitPuffinreactormonk: you mean pressing it further down?
14:28:48BitPuffinthat's a problem mainly with cheapos
14:32:40reactormonkBitPuffin, ok.
14:33:31BitPuffinbut yeah as gokr pointed out, there are ones that don't require hard keypresses, maybe it's worth finding one :)
14:34:59*brson joined #nim
14:37:17*darkf quit (Quit: Leaving)
14:42:03*willwillson quit (Ping timeout: 250 seconds)
14:44:27reactormonkBitPuffin, got one from logitec that isn't mechanical, but rather flat and I didn't have any complains yet. The only problem it runs out of battery ^^
14:51:26BitPuffinfrom what I hear it's not until you have typed on a mechanical keyboard that you can't go back :P
14:51:27EXetoCare you saying that this cheap membrane keyboard of mine isn't a real keyboard?
14:54:56*ciony quit (Ping timeout: 258 seconds)
15:07:32*saml joined #nim
15:31:28*kapil__ quit (Quit: Connection closed for inactivity)
15:38:50*reloc0 joined #nim
15:43:34*Ven joined #nim
16:02:55*quasinoxen quit (Ping timeout: 272 seconds)
16:04:12*quasinoxen joined #nim
16:05:41*ciony joined #nim
16:08:37*khmm quit (Ping timeout: 240 seconds)
16:12:01*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:18:46*milosn joined #nim
16:30:27*boydgreenfield joined #nim
16:41:23*t4nk971 joined #nim
16:43:38reactormonkBitPuffin, hm. let's see.
16:52:18*yeye123 joined #nim
17:13:19*vendethiel joined #nim
17:13:29*willwillson joined #nim
17:16:50*gokr_ joined #nim
17:19:38*enurlyx quit (Quit: Leaving.)
17:21:32*xcombelle joined #nim
17:28:27*kniteli joined #nim
17:29:58*boydgreenfield quit (Quit: boydgreenfield)
17:34:12*ciony quit (Quit: Nettalk6 - www.ntalk.de)
17:34:31*yeye123 quit (Ping timeout: 250 seconds)
17:35:41*Matthias247 joined #nim
18:00:28*gokr_ quit (Ping timeout: 258 seconds)
18:02:46*boydgreenfield joined #nim
18:14:01dts|pokeballvar db = open("db.sql", "", "", "") # does this function require the file db.sql to already exist, or is it something created by sqlite for managing databases?
18:14:35dts|pokeballalso, if i wanted to create a database could i do it with that funcion
18:14:39dts|pokeball?
18:17:37*BitPuffin quit (Ping timeout: 240 seconds)
18:25:56ldleworkIs there anyway to reverse a seq?
18:28:40gokrYes, aseq.reverse()
18:28:52gokrsequtils I think
18:29:02gokrCheck my article about seq :)
18:30:48*yeye123 joined #nim
18:31:46ldleworkokay I do not see reverse in here: http://nim-lang.org/sequtils.html
18:32:00gokrHmmm, I was sure it was somewhere... hang on
18:32:09onionhammerdts|pokeball I would prefix the open() call.. db_sqlite.open() (or whatever the module name is)
18:32:17onionhammerim guessing it's a direct wrapper of this https://www.sqlite.org/c3ref/open.html
18:32:54dts|pokeballonionhammer, ok, but what about my question?
18:32:59onionhammerso if it doesnt exist you want to make sure to pass the SQLITE_OPEN_CREATE flag
18:33:10*alex____ joined #nim
18:33:13onionhammerim not sure if it does, you'll have to look at the module source
18:33:24gokrldlework: algorithm module
18:33:29onionhammerdts|pokeball teach a man to fish :P
18:33:38dts|pokeballonionhammer, good point :/
18:34:07gokrldlework: Or just ctrl-f "reverse" at: http://nim-lang.org/theindex.html
18:34:29gokrYou have both reverse (destructive) and reversed there
18:34:43onionhammerlib\impure\db_sqlite.nim
18:35:33onionhammerand that lib uses lib/wrappers/sqlite3.nim
18:44:29*Sembei quit (Ping timeout: 244 seconds)
18:52:41ldleworkt = t[1..t.high] chops off the first element right?
18:53:03yeye123anyone know the gtk2 wrapper, why does this not work? trueArray[13]=get_active(checkbutton)
18:55:05*milosn quit (Ping timeout: 264 seconds)
19:00:38dts|pokeballldlework, it should. high gets the last element right?
19:02:31*Sembei joined #nim
19:08:50*yeye123 quit (Quit: Leaving)
19:27:18ldleworkhow do you iterate backwards?
19:30:03Araqcountdown + a[i] access
19:31:50*rpag joined #nim
19:40:01t4nk971is it not possible to assign to the items taken from a sequence in a for loop?
19:41:40t4nk971if 'list' is a seq[int] and i do "for item in list: item = 1" it says "Error: 'item' cannot be assigned to"
19:42:41*yeye123 joined #nim
19:43:01Araqyou should use 'mitems' which for some reason never was added to system.nim
19:43:13t4nk971oh, ok thanks :)
19:43:30reactormonkt4nk971, items returns a non-assignable reference.
19:43:43reactormonkThe reference from mitems is assignable.
19:44:38t4nk971is mitems a keyword or something i need to import?
19:47:18reactormonknah, it's just another method.
19:47:20reactormonkimport sequtils
19:47:58Araqyou need to write it :P
19:47:58Araqand make a PR
19:50:58*milosn joined #nim
19:51:18reactormonkAraq, there's no mitems for seq?
19:51:41Araqreactormonk: not in system at least
19:52:14reactormonkAraq, in sequtils?
19:52:37t4nk971can't see it in sequtils
19:54:34reactormonkduh
19:55:29reactormonkt4nk971, grab the implementation from e.g. tables and combine it with the items implementation from seq
19:57:29*Stefan_SAlewski joined #nim
19:59:00Stefan_SAlewskiyeye123 asked: gtk2 wrapper, why does this not work? trueArray[13]=get_active(checkbutton)
19:59:58Stefan_SAlewskiyeye: Note that GTK uses GBOOLEAN, which is int. It is diffeent from Nims bool.
20:03:35yeye123ahh
20:08:47*repax joined #nim
20:12:27repaxThe move to #nim seems to have taken quite a toll on channel participation
20:12:36yeye123so trueArray[13]=bool(get_active(checkbutton)) should work?
20:13:13repaxIt doesn't?
20:13:47yeye123no, but its getting late so i might be missing something here
20:14:06dts|pokeballin the times module, there is the format function which takes a TTimeInfo and a format string. do i need to pass an initialized TTimeInfo to format, and if so, what does it need to be initialized with?
20:14:33Araqyes and dunno
20:14:47dts|pokeballhmmm
20:16:46Stefan_SAlewskiyeye, you may try something like trueArray[13]=(get_active(checkbutton) == GTRUE)
20:17:21*Varriount|Busy joined #nim
20:17:34Varriount|BusyMeep
20:18:22Varriount|BusyUm, shouldn't the build farm be buildbot.nim-lang.org
20:19:57Stefan_SAlewskiYeye123: I am currently asking myself how we get the type of an variable in Nim, something like get_active(checkbutton).class ? That would help when trying GTK...
20:20:37repaxyeye123, Stefan_SAlewski: you can define a proc `bool()` for what ever `get_active` returns that converts it to a bool
20:21:27yeye123Error: undeclared identifier: 'GTRUE'
20:21:53Stefan_SAlewskiSure, but currently GTK wrapper is low level still...
20:22:07Varriount|BusyStefan_SAlewski: http://nim-lang.org/manual.html#type-operator_toc
20:22:26Varriount|BusyOr http://nim-lang.org/manual.html#type-operator
20:23:39*BitPuffin joined #nim
20:23:55Stefan_SAlewskiYeye, GTRUE should be something like not int(0), please consult the gtk2.nim file or aporia editor, it is a great example.
20:24:41*dts|pokeball quit (Quit: is a client command Fabtasticwill)
20:24:52*bjz quit (Read error: Connection reset by peer)
20:25:08*bjz joined #nim
20:25:32*bjz quit (Read error: Connection reset by peer)
20:25:40AraqVarriount|Busy, Stefan_SAlewski type() HAS NO RUNTIME REPRESENTATION
20:25:44*dts|pokeball joined #nim
20:26:11Araqrepax: no you cannot. you can use a 'converter' though.
20:26:30*bjz_ joined #nim
20:26:30Araqproc `bool()` is not at all the syntax for a converter
20:27:06Araqhrm fixing bug #1715 means I should rewrite parts of the code generator ...
20:27:09Varriount|BusyAlthough, it's an interesting syntactical idea.
20:27:12repaxOh, then I've misused it
20:27:13Araqwith unknown consequences
20:27:53reactormonkAraq, should I post seq mitems on github as issue?
20:29:07*bjz_ quit (Read error: Connection reset by peer)
20:29:15*Stefan_SAlewski quit ()
20:29:22*bjz joined #nim
20:29:45Araqreactormonk: yup, make a PR please. extra points if you add tests for it and update news.txt
20:30:06*betawaffle quit (*.net *.split)
20:30:06*reactormonk quit (*.net *.split)
20:30:06*acidx quit (*.net *.split)
20:31:16*betawaffle joined #nim
20:31:16*reactormonk joined #nim
20:31:16*acidx joined #nim
20:32:06repaxHow does one rebuild the docs? I've tried `koch web` but get this: external program failed, retrying serial work queue for logs!
20:32:40repaxError: execution of an external program failed
20:32:51repaxDoesn't say which external program
20:34:28Varriount|BusyHm. I recall that gradha did some modification to the doc generation routines, to try and parallelize them.
20:35:01Varriount|Busyreactormonk: 'seq mitems'?
20:35:03Araqyou can use --parallelBuild:1 to get rid of it
20:35:09reactormonkVarriount|Busy, mitems for seq.
20:35:15reactormonkAraq, nah, sorry, messing around with monoids
20:35:29Varriount|Busyreactormonk: And what are/is mitems?
20:35:55reactormonkVarriount|Busy, an iterator which returns a var instance, one that can be modified
20:36:34Varriount|BusySounds useful. Naming needs a bit of work though.
20:36:49reactormonkAraq, gotta rename that nimrod repo on github ;-)
20:36:52*brson quit (Quit: leaving)
20:36:52reactormonkVarriount|Busy, hum?
20:36:59*brson joined #nim
20:37:06*Matthias247 quit (Quit: Matthias247)
20:37:07Araqno, this is the standard naming convention for 'var T' iterators, Varriount|Busy
20:37:25Varriount|BusyOh.
20:37:26Araqthe 'm' stands for 'mutable' or 'modifyable'
20:37:57Varriount|BusyWell, it's not very obvious...
20:38:40*bjz quit (Read error: Connection reset by peer)
20:38:53Araqwell yes, now we all know that prefixes are from hell and everybody loves the conciseness of 'mutable.items' instead
20:38:56*bjz joined #nim
20:39:01reactormonkVarriount|Busy, nope, but that's the standard. Got a better name?
20:39:08reactormonkAraq, rein your horses.
20:39:19Varriount|Busyreactormonk: 'mutableItems'?
20:39:30*flaviu joined #nim
20:39:35reactormonkVarriount|Busy, too long. 8-10 chars max imo
20:40:06repaxAraq, that removes the parallel problem. Then it terminates with the following: "lib/wrappers/iup.nim(205, 51) Error: ')' expected" I don't see anything wrong on that line though
20:40:54flaviureactormonk: muitms?
20:40:59*Jesin joined #nim
20:41:00flaviu;)
20:41:02repaxAh , it's the "func" keyword
20:41:03reactormonkflaviu, ...
20:41:07yeye123converter toBool*(gbool: gboolean): bool = return int(gbool) == 1 so its already there?
20:41:09Varriount|Busyreactormonk: 'varItems'?
20:41:33flaviu`items`?
20:41:58Araqrepax: already pushed a fix for that
20:42:50reactormonkVarriount|Busy, varItems sounds good to me.
20:42:58reactormonkVarriount|Busy, but legacy. :-/
20:43:20Varriount|BusyWhat legacy?
20:43:49flaviuWhy not just overload `items`?
20:43:51reactormonkVarriount|Busy, mitems is kinda set in place already with all the other code
20:44:00reactormonkflaviu, it would be return type overloading, can we do that?
20:44:04Varriount|BusyDo we currently have other iterators that return vars?
20:44:16reactormonkVarriount|Busy, yup, check the stdlib e.g. tables
20:44:23flaviuMake `items(var seq[T]): var T`, `items(seq[T]): T`
20:44:39flaviushouldn't that work?
20:45:53flaviuPossible criticism: "what if I want to ensure I don't mutate it accidentally?"
20:45:53flaviuSolution: Reassign the collection as a non-var
20:46:25reactormonkAraq, ^ sounds good to me
20:49:13t4nk971I tried using an implementation of mitems that starts like "iterator mitems*[T](a: var seq[T]): var T {.inline.} =" and essentially is just "while i < L: yield a[i]" but using it as "for items in <seq>.mitems:" gives me an error in the C: cannot convert to a pointer type link_91222 = &((link91005*) ((*links)->data[i_91226]));
20:49:15EXetoCthat's a high cost for correcteness
20:50:40Araqt4nk971: are you on devel?
20:51:09yeye123trueArray[13]=toBool(get_active(checkbutton)) should do it then but no
20:54:32Varriount|BusyEXetoC: What is a high cost for correctness?
20:55:19t4nk971not on devel, just downloaded the 32 bit windows build from website
20:56:02Araqt4nk971: report it please
20:56:06flaviuhmm, the error makes sense, but it shouldn't have happened in the cgen.
20:56:22flaviuI think it's because a[i] returns a T, not a var T.
20:57:21flaviuas a workaround, pointer arithmetic might work.
20:57:37EXetoCVarriount|Busy: nevermind
20:57:49Araqflaviu: no it should work out of the box
20:58:18Araqa[i] for builtin types uses "return type overloading". well not really.
20:58:22flaviuAraq: It should, but how would it? Overload `[]`(var seq[T]): var T?
20:58:37Araqthat's not how [] for seqs is implemented
21:00:18flaviuyeah, I can't find `[]`(seq[T]): T in the docs
21:00:59*Puffin joined #nim
21:01:29*willwillson quit (Ping timeout: 245 seconds)
21:01:54*BitPuffin quit (Ping timeout: 245 seconds)
21:02:19*rpag quit (Ping timeout: 245 seconds)
21:02:44*Araq quit (Ping timeout: 245 seconds)
21:02:51Varriount|Busyreactormonk: I still dislike 'legacy' as a reason.
21:02:52*yeye123 quit (Quit: Leaving)
21:02:57*Araq joined #nim
21:03:27reactormonkVarriount|Busy, so do I
21:03:44*willwillson joined #nim
21:03:44*Mat4 joined #nim
21:03:53Mat4hi all
21:04:01Varriount|BusyIn fact, now that we have a deprecation mechanism for old names...
21:04:08Varriount|Busy;3
21:04:55AraqVarriount|Busy: yeah, sure let's do MOAR bike shedding
21:04:59Varriount|BusyStill, I think Araq might cut off my fingers if I type anymore, so I'll get back to partitioning this hard drive.
21:05:14Araqthat never harmed any software project, after all
21:05:42Araqand btw I really like the 'm' solution
21:06:08Varriount|BusyAraq: Yes, but you already know what it means. What will newcomers think?
21:06:09AraqI think it's a perfect compromise of clearity and conciseness
21:06:28Araqmaybe newcomers will eventually learn the language
21:06:42flaviuVarriount|Busy: It better be btrfs :P
21:07:08Varriount|Busyflaviu: Nah, it's NTFS
21:08:52*Varriount|Busy runs away from flaviu's rage
21:13:27Varriount|BusyAnyway, I'll be back on in an hour and a half to argue some more.
21:13:47Araqno
21:13:58Araqgimme real test results instead
21:14:13Araqextra points if I can see them in this millenium
21:15:20*rpag joined #nim
21:15:47Mat4Araq: sorry, what is the 'm' solution ?
21:16:55*ekarlso- joined #nim
21:17:29*Jesin quit (Quit: Leaving)
21:17:52*Varriount|Busy quit (Ping timeout: 246 seconds)
21:18:03AraqMat4: please read the logs
21:19:40*Jesin joined #nim
21:27:25*Matthias247 joined #nim
21:28:52dts|pokeballjust to make sure i understand these two functions, using inputHandle i can use as the input the program expects and then outputHandle can be used to grab the output of the program?
21:31:53Araqdts|pokeball: that depends onto how the process you run does its buffering
21:31:59Araqit's inherently fragile
21:32:33Araqglueing small programs together only works when you never really try it
21:32:42dts|pokeballhmmm... im wanting to make a nim eval bot. would those work?
21:34:34*gour_ joined #nim
21:35:39repaxyeah, let us run arbitrary code on your machine
21:36:06dts|pokeballonly i would be able to use it for now
21:37:57*gour quit (Ping timeout: 272 seconds)
21:39:07reactormonkdts|pokeball, you could take a bite off geordi
21:39:43dts|pokeballi dont understand haskell :/
21:39:54*gour_ is now known as gour
21:39:55reactormonktime to change that
21:40:23dom96dts|pokeball: do it
21:41:04dts|pokeball:(
21:41:18dom96dts|pokeball: No, I mean. Create an eval bot.
21:41:25dom96dts|pokeball: Research how to sandbox it.
21:41:31dom96dts|pokeball: And get it going!
21:41:37dom96Would be awesome to have it here.
21:42:04dom96If you could integrate it into NimBot then it would be even better.
21:42:24*xcombelle quit (Ping timeout: 264 seconds)
21:42:33dts|pokeballi know. i just need to figure out a good damn way of grabbing output from the nim compiler
21:42:43dts|pokeballalso, i need it to only output one error at a time
21:43:07Araqnah, just pipe it to some temp file and parse that
21:43:31Araqthere is a feature request for proper buffer flushing for the compiler, but that just proves my point
21:43:32dts|pokeballhmmm... i guess i might just have to do that
21:44:08Araqdts|pokeball: you can use the pegs the tester uses to parse compiler output
21:44:09dts|pokeballwhats the best proc to start another process?
21:44:30dts|pokeballAraq, yeah. i was just hoping for something a little more elegant
21:44:45Araqthe proc that doesn't makes you mess with streams
21:45:26dts|pokeballexecShellCmd
21:45:38dts|pokeballim thinking this and just running bash
21:45:52*t4nk971 quit (Ping timeout: 246 seconds)
21:46:08Araqnow that's a particularly bad idea
21:46:18dts|pokeballhow so?
21:48:30ldleworkEXetoC: http://www.angusj.com/delphi/clipper.php
21:51:56Araqdts|pokeball: use osproc.execCmdEx
21:52:35dts|pokeballok. ty
21:53:17EXetoCldlework: gonna use it for the game?
21:53:34EXetoCoh, no C
21:53:47dts|pokeballsomeone should make man pages for the nim standard library...
21:56:08dts|pokeballwhat type is tainted string/
22:01:18willwillsonit is an alias of string unless you compile with --taintMode:on (I think)
22:01:24*StefanSalewski joined #nim
22:01:46StefanSalewskiyeye wrote: trueArray[13]=toBool(get_active(checkbutton)) should do it then but no
22:02:10StefanSalewskiyeye, when you still have problems...
22:02:16*dts|pokeball quit (Quit: Leaving)
22:02:39*dts|pokeball joined #nim
22:02:47StefanSalewskiYou can send me a larger part of your code, I will try to proof it.
22:04:21StefanSalewskiYour statements makes it not really clear what the problem is. Try assigning to a plain variable, not an array.
22:05:07StefanSalewskiDo you have a valid widget/button as your checkbutton?
22:09:44flaviurepax: Why not? Docker exists, just do it all in the container and clear it once a day or so.
22:13:46repaxflaviu, it was just a well-intended precautionary remark.
22:14:33ldleworkDocker is not a security product
22:15:35flaviurepax: Sorry, my tone was not intended to be rude.
22:15:52milosnmaw maw
22:15:53milosn:D
22:16:15flaviuldlework: Regardless, lots of people are using it as such. Anyway, if someone tries something too stupid, an OP can just ban them.
22:16:28repaxflaviu, np
22:16:32repaxPlease do write an eval bot if you are confident that you can contain it
22:17:10*t4nk535 joined #nim
22:17:15repax("you" as in anyone)
22:17:19flaviurepax: I would, but I don't have the resources to keep it running.
22:17:48flaviudom96: Mind dumping the irclogs database somewhere?
22:18:54*brson quit (Ping timeout: 244 seconds)
22:19:23repaxA bot could also try to match questions to answers found in the logs. There's another project ;)
22:20:18flaviuYes, that would be interesting. Someone writing that could make a paper out of it.
22:21:02flaviuHas anyone seen what they do in #archlinux? They have a bot that the program with common FAQs, which they can trigger whenever.
22:22:16repaxI think I've seen it in ##C++ as well
22:23:27t4nk535hi, just wanted to say i found the problem I had earlier with a version of mitems. As far as I can tell I was getting the cgen error because the var T being returned from mitems didn't work with a seq of tuples. As soon as I replaced it with a seq of object it compiled ok.
22:23:30repaxI like it when people thank the bot
22:24:33flaviut4nk535: ref object, or just object?
22:26:00StefanSalewskiconverters are indeed interesting -- I was not aware that after defining one we can write "if i:" with i being an integer expression! Nice.
22:27:05flaviuStefanSalewski: I don't really have strong thoughts on this, but is that really a good idea?
22:28:23StefanSalewskiIts fine for glib with gboolean beeing int -- nice solution there!
22:29:53EXetoCmaybe make it a distinct bool type
22:30:41*Johz joined #nim
22:33:12JohzHeya, I'm getting an error, and I was wondering if it was something I was doing wrong.
22:33:30StefanSalewskiIn current glib2 gboolean is a destinct cint with converters to/from Nim bool. I think that is fine, I will copy that for my GTK3 stuff.
22:33:53t4nk535flaviu: where I'm trying to iterate through a seq[Link], I did have Link as a tuple made of two objects, which perhaps wasn't the best approach anyway. Now I have seq[Link] defined as "Link = object" so not a ref afaict. Thinking about it, it makes more sense to define this as an object with two others inside it, than a tuple with objects inside. I'm not sure of the internals of tuple though and whether this should have worked or not.
22:34:03JohzI'm nesting a template within a template, because I want things the block passed to the outer template to have access to the templates within the outer template.
22:34:21JohzThe simplest possible thing that I can get to fail looks a bit like this: https://gist.github.com/MrJohz/fe55bf4da00203cbf66e
22:35:24JohzThe traceback with nim in non-release mode looks a bit like this: https://gist.github.com/MrJohz/fe55bf4da00203cbf66e#file-traceback
22:37:33*BillsPC joined #nim
22:37:34*brson joined #nim
22:37:38dts|pokeball,part #nim
22:37:39*BillsPC left #nim (#nim)
22:37:42*BillsPC joined #nim
22:37:47dts|pokeball,part #nim test
22:37:47*BillsPC left #nim (#nim)
22:37:50dts|pokeballdamn
22:37:54*BillsPC joined #nim
22:38:05dts|pokeball,eval echo("Hello, world!")
22:38:06BillsPCdts|pokeball: /bin/sh: 1: ./irc.freenode.net.dts: not found
22:38:42dts|pokeballoh damn
22:39:03*dts|pokeball is now known as dts
22:39:19dts,eval echo("Hello, world!")
22:39:20BillsPCdts: /bin/sh: 1: ./irc.freenode.net.dts.nim: Permission denied
22:39:33*alex____ quit (Quit: Page closed)
22:40:33*BillsPC quit (Remote host closed the connection)
22:40:33*brson quit (Client Quit)
22:41:03*BillsPC joined #nim
22:41:14dts,eval echo("Hello, world!")
22:41:15BillsPCdts: /bin/sh: 1: ./irc.freenode.net.dts.: not found
22:41:20*brson joined #nim
22:44:19*t4nk535 quit (Ping timeout: 246 seconds)
22:48:10*Johz quit (Ping timeout: 246 seconds)
22:50:15flaviudts: btw, you can join any channel, even one like #A4fIx4r to test the bot.
22:51:14ldleworkEXetoC: this shit is soooooooo complicated
22:51:56EXetoCldlework: don't you just move along the axes?
22:52:40*t4nk583 joined #nim
22:54:14dom96dts: Please test it in #nim-offtopic
22:54:17dom96flaviu: What for?
22:54:52flaviudom96: Just to have fun with. I can't be bothered to write a second scraper.
22:55:31dom96flaviu: It's saved as JSON. I can make it accessible if you want.
22:55:42flaviuSure, please do.
22:55:46ldleworkEXetoC: the complication isn't in moving the character around
22:56:08ldleworkEXetoC: its to do with testing points in polygons, cutting polygons iwth a line, determining the clockwise order of a polygon, etc etc
22:56:47EXetoCPaul Bourke's resources to the rescue?
22:57:09EXetoCI often stumble upon those
22:57:18*gour quit (Quit: Konversation terminated!)
22:57:26ldlework(polyX[i]+(y-polyY[i])/(polyY[j]-polyY[i])*(polyX[j]-polyX[i])<x)
22:57:33ldleworkDo we agree that the order of operations here are
22:57:55ldleworksubtraction, subtraction, division, multiplication, addition, less-than
22:57:57ldleworkthis is C
22:58:09ldleworkthat's three subtractions*
22:59:28EXetoCso compact :p
23:03:00ldleworkIts so frustrating
23:03:13ldleworkI have this algorithm that claims to find whether a point is inside or outside of a complex polygon
23:03:28ldleworkAs my polygon becomes more complex, the results get more and more unreliable :(
23:04:16EXetoCdoes it only handle convex polygons for example?
23:04:51ldleworkEXetoC: nope
23:05:03ldleworkits supposed to even be able to detect twisted polys
23:05:25Araqldlework: sounds like floating point fun
23:05:58gokrThe ray casting algo?
23:07:23gokrLike one of these: http://geomalgorithms.com/a03-_inclusion.html
23:08:10ldleworkgokr: yes
23:08:12ldleworkthat one
23:08:58gokrWrote a really cool optimization tool many years ago, implemented several fun algos.
23:09:36ldleworkI suck
23:12:03Araqdom96: what about the showstoppers?
23:12:19Araqyou know "showstopper" means "blocks the release"
23:12:21dtsflaviu, ok. dom96 sorry didnt know that channel existed
23:12:56dts,join #nim-offtopic
23:13:40dom96Araq: kk
23:14:18Araqping Varriount
23:14:55dtshow come module files cant have other .'s in the name?
23:14:58ldleworkEXetoC: here is my implementation: https://gist.github.com/dustinlacewell/1e10bf9210892642c7c5
23:16:55Mat4Idlework: have you considered rounding errors as reason ?
23:18:59*BillsPC quit (Remote host closed the connection)
23:19:05Araqdts: because a module has a Nim identifier representation
23:19:06ldleworkMat4: I have but I would have no idea how to fix it
23:19:14Araqand '.' must not be part of Nim identifier either
23:19:38Araqhow come nobody gets the module system and hacks around it?
23:20:34Mat4Idlework: Use saturated fixpoint arithmetic and choose a well matching scale
23:20:53dtsAraq, ah
23:21:12*repax quit (Quit: repax)
23:21:19gokrldlework: When I worked with polys etc we used Smalltalk which has support for "infinite" integers and uses fractions.
23:21:52*repax joined #nim
23:22:02gokrSo like Mat4 said, we used a scale.
23:23:43StefanSalewskiFor polygons I used successfully this one, maybe only for convex ones: http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html
23:24:17EXetoCpeople manage in games and such. are these numbers really small or something?
23:25:46*dts is now known as BillsPC
23:26:56AraqEXetoC: doens't really matter if really small or really big, it only matters that you don't mix really small with really big. Or something like that.
23:28:05repaxAlso, errors grow as values are combined
23:28:41*BillsPC is now known as dts|pokeball
23:28:55Triplefoxfor floats in games the main things are: near zero(performance loss from denormalization), extreme values(low accuracy)...and equality tests(use an error range)
23:31:00repaxA fractional type could be handy in this situation
23:32:14ldleworkwhy do I sometimes get: type mismatch: got (tuple[x: int, y: int], ref Poly)
23:32:24ldleworkbut expected one of:
23:32:26ldleworkqix.inPoly(self: Point, poly: Poly): bool
23:32:35ldleworkPoint is defined as tuple[x, y: int]
23:32:41ldleworkand I'm passing it a Point
23:33:49ldleworkoh its the ref
23:34:21EXetoCwait until there are 10 or so arguments :>
23:47:06dom96Araq: I set up a redirect from nimrod-lang.org to nim-lang.org btw
23:47:28Araqdom96: ok.