<< 07-12-2013 >>

00:00:53*Demos joined #nimrod
00:03:31BitPuffinyeah I think I'm gonna do that
00:03:33BitPuffinnight!
00:03:46*BitPuffin quit (Quit: WeeChat 0.4.2)
00:04:10*Icefoz quit (Quit: leaving)
00:05:06*Icefoz joined #nimrod
00:05:34*Icefoz left #nimrod (#nimrod)
00:06:01*Icefoz joined #nimrod
00:10:48*Amrykid quit (Excess Flood)
00:11:18*Amrykid joined #nimrod
00:17:40*ics quit (Ping timeout: 246 seconds)
00:20:36*ics joined #nimrod
00:31:48*Hannibal_Smith quit (Quit: Sto andando via)
00:32:22*zielmicha quit (Ping timeout: 246 seconds)
00:49:22*ics quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
01:06:27*boydgreenfield quit (Quit: boydgreenfield)
01:50:33*DAddYE quit (Remote host closed the connection)
01:51:07*DAddYE joined #nimrod
01:55:19*DAddYE quit (Ping timeout: 246 seconds)
02:03:09*webskipper quit (Ping timeout: 246 seconds)
02:03:43*brson quit (Quit: leaving)
02:06:05OrionPKMvarriount you here?
02:12:39*Demos quit (Quit: Textual IRC Client: www.textualapp.com)
02:36:06VarriountOrionPKM, yeah
02:36:26VarriountI was playing a fullscreen game, sorry.
02:36:39OrionPKMnp
02:37:30OrionPKMnever mind, I was going to ask you something, but it doesn't matter anymore
02:37:34VarriountOh?
02:41:10OrionPKMyeah. at the gym now though, so can't talk
02:44:03OrionPKMI'm working on babel integration when I get back tho
03:50:42*EXetoC quit (Quit: WeeChat 0.4.2)
03:53:07*DAddYE joined #nimrod
03:57:26*DAddYE quit (Ping timeout: 240 seconds)
04:16:31*fundamental quit (Read error: Operation timed out)
04:32:18*fundamental joined #nimrod
04:51:09*mflamer joined #nimrod
04:54:20*DAddYE joined #nimrod
04:58:51*ics joined #nimrod
04:59:50*DAddYE quit (Ping timeout: 240 seconds)
05:21:00VarriountAraq, how would one do nimrod/python style indentation in the peg parser? Is it possible?
05:21:10Varriount*with the peg parser module
05:56:37*DAddYE joined #nimrod
06:00:38*DAddYE quit (Ping timeout: 240 seconds)
06:00:50*ics quit (Ping timeout: 246 seconds)
06:02:26*ics joined #nimrod
06:57:43*DAddYE joined #nimrod
07:03:02*DAddYE quit (Ping timeout: 240 seconds)
07:18:49*hoverbear quit (Quit: Hibernating, be back soon.)
07:35:39*boydgreenfield joined #nimrod
07:59:55*DAddYE joined #nimrod
08:04:14*DAddYE quit (Ping timeout: 240 seconds)
08:15:07*webskipper joined #nimrod
08:16:40*dymk quit (Ping timeout: 245 seconds)
08:21:51*dymk joined #nimrod
08:37:21*_dymk joined #nimrod
08:37:45*dymk quit (Ping timeout: 245 seconds)
08:46:58*boydgreenfield quit (Quit: boydgreenfield)
09:00:48*DAddYE joined #nimrod
09:00:58*webskipper quit (Ping timeout: 240 seconds)
09:05:11*DAddYE quit (Ping timeout: 252 seconds)
09:19:13*silven joined #nimrod
09:27:14*shodan45 quit (Quit: Konversation terminated!)
09:49:04*io2 joined #nimrod
10:02:01*DAddYE joined #nimrod
10:06:20*DAddYE quit (Ping timeout: 240 seconds)
10:42:23*_dymk quit (Quit: ZNC Bouncer Quitting)
10:43:59*dymk joined #nimrod
10:44:38*mflamer quit (Ping timeout: 240 seconds)
11:00:13*PortablePuffin joined #nimrod
11:03:20*DAddYE joined #nimrod
11:05:50*BitPuffin joined #nimrod
11:06:03BitPuffinAraq: But openarrays are for parameters!
11:06:05BitPuffinanyways
11:07:26*DAddYE quit (Ping timeout: 240 seconds)
11:07:28BitPuffinAraq: I think I'm gonna need to send pretty big quantities of data through channels and that's apparently slow. Is there a good option to this though? maybe having some global seq that one can write and one can read and you send a message to read and push it in to that stack and pop it after reading maybe?
11:11:18BitPuffinguess it would be the reverse of push and pop
11:11:22BitPuffinbut you get the idea
11:12:44fowlhi BitPuffin
11:12:51fowlhows life
11:13:07BitPuffinfowl: hey fow
11:13:10BitPuffinl
11:13:14BitPuffinstressful, and yours? :)
11:17:48BitPuffinAraq: well I guess it isn't like video files I'm gonna be passing arounds. But say 250 000 vertices? so with float32's that's 4*4*250000 bytes
11:18:14BitPuffin3906.5kb
11:18:52BitPuffin~3.8 MB
11:18:59BitPuffinIs that too much to pass through a channel?
11:19:06BitPuffindom96: opinion plox
11:19:25BitPuffinand fowl if you know this stuff
11:27:27fowlwhat are you doing
11:27:33fowlwith so much data
11:31:24BitPuffinfowl: terrain
11:32:36BitPuffinthat's only one vertex per meter, I'm experimenting with interpolating via the geometry shader
11:32:57BitPuffinofc geometry shaders aren't the fastest things so that's why it is experimenting
11:33:04BitPuffinbut that allows me to send less data to the gpu
11:36:39fowlhow are channels "apparently slow" did you do actually try it
11:50:18BitPuffinfowl: not yet, but there are warnings on the site and dom96 freaked out
11:52:17fowlBitPuffin, do you have libjit installed
11:52:52BitPuffinfowl: no
11:52:55BitPuffinor well let me check
11:53:23BitPuffindon't think so no
11:54:40BitPuffinnope
11:56:04fowlo
11:57:17PortablePuffinfowl: Why do you ask?
11:58:03fowlim getting a segfault running an example from the tutorial (in nimrod)
11:58:18fowlit compiles and runs fine from c
11:58:34PortablePuffinhm. That's weird
11:59:03PortablePuffinfowl: look at the generated c source I guess
12:04:52*DAddYE joined #nimrod
12:07:38BitPuffinwho the hell is PortablePuffin
12:08:01PortablePuffinBitPuffin: yo moma
12:08:06BitPuffin'kay
12:08:18PortablePuffin:
12:08:18BitPuffinD
12:09:02*DAddYE quit (Ping timeout: 240 seconds)
12:11:49fowlthe generated c is fine
12:12:25BitPuffinfowl: gdb it? :P
12:12:31fowli dunno how :(
12:17:14BitPuffinfowl: this one is a decent introduction http://youtu.be/sCtY--xRUyI
12:24:41BitPuffinNOOB CAN'T EVEN CODE FACTORIAL
12:26:18*Hannibal_Smith joined #nimrod
12:28:59fowlwell
12:29:13fowlthat doesnt help
12:29:23fowla function thats imported is segfaulting
12:32:06*Kristina_ is now known as kristina
12:32:29BitPuffinfowl: well you can also use gdb to dissassemble
12:32:39BitPuffinfowl: disassemble*
12:32:58BitPuffinfowl: so you could compare the asm of the c and nimrod versions
12:33:06BitPuffinmaybe that can give you some hints on what's going on
12:33:59fowlbut the c version works
12:34:20BitPuffinfowl: yeah, that's the point, you can compare the C version that works with the nimrod version that doesn't
12:34:28BitPuffinyou are drunk today aren't you
12:35:30fowlno :(
12:35:36fowli ran out of money, no beer
12:37:49BitPuffinno beer is probably a good thing
12:39:23BitPuffinhttp://cgdb.github.io/ is also really cool
12:46:28Araqhi PortablePuffin welcome
12:46:39AraqBitPuffin: just send a 'ptr' then
12:46:43BitPuffinAraq: that's just me on my phone but thanks :P
12:47:01Araqno, he's your mum
12:47:08BitPuffinoh yes
12:47:09BitPuffintrue
12:47:11BitPuffinI am my own mother
12:47:28KoodaD:
12:47:35fowlBitPuffin, its no use unless i recompile libjit with debugging symbols
12:47:58BitPuffinAraq: okay maybe a ptr could work. I guess ref is forbidden because the GC only works on local threads?
12:48:19BitPuffinfowl: well libjit obviously works so there is some difference in your code
12:48:30fowlnope there is none
12:48:34Araq'ref' is not forbidden but causes a copy of the whole thing
12:48:57BitPuffinah yeah true. I remember it saying that there is a deep copy
12:49:03Araqand yes ... if the data structure contains cycles stuff crashes
12:49:20BitPuffinAraq: do you think sending ca 3.8mb is that slow though?
12:49:35AraqI think it's stupid, yes
12:49:48BitPuffinalright
12:49:56BitPuffinwell after its creation the data will be static anyway
12:50:00BitPuffinso what could go wrong :D
12:50:47BitPuffinin fact it doesn't even have to break gc? Because all the message will trigger is data being sent to the gpu. So I could just get a ptr with addr no?
12:51:42Araq"level" is a palindrome
12:53:45BitPuffinhaha correct
12:54:15fowlradar
12:54:18Araqwell the thing is: you're on your own when use 'ptr'
12:54:39Araqyou need to ensure the data lives long enough in the thread that owns the data
12:54:45BitPuffinAraq: so the gc stops trying the moment I do addr x?
12:55:15AraqI guess you can say that. The GC doesn't trace addr x
12:55:22*Hannibal_Smith quit (Quit: Sto andando via)
12:55:26BitPuffinno but does it keep tracing x?
12:55:32BitPuffinif x is ref
12:55:51Araqwell it traces 'x' on the heap that 'x' was created
12:56:29BitPuffinhmm, but I guess it's not a good idea to let the gc keep tracking x at that point
12:56:39Araqwhen that thread dies, the memory is freed no matter if other threads access that data
12:56:40BitPuffinsince it could delete x while the receiver of addr is using it
12:57:01BitPuffincould be less of a problem though
12:57:27Araqyou can also use allocShared
12:57:37Araqwhich seems to be easier to use from what I can tell
12:57:39BitPuffinsince that thread with the data will only die when the program dies. And that data will probably be kept in that thread and not freed until you walk too far away from that terrain section
12:58:19BitPuffinand by then it's obviously already on the gpu
12:58:27BitPuffinbeing rendered and stuff
12:58:38BitPuffinor actually done rendering for the moment
13:00:22BitPuffinAraq: hmm, well if I send a ptr through a channel doesn't that more or less have the same effect as allocShared?
13:01:04BitPuffinor an addr or whatever
13:01:42BitPuffinI guess I could even make it nicely GC'd by creating a finalizer that sends a message to the opengl thread to delete the buffer
13:01:50Araqno, it's completely different
13:02:26Araqsending a ptr sends the data but the ownership is still bound to the creating thread
13:02:50AraqallocShared creates something that has no owner
13:02:57BitPuffinright
13:03:09BitPuffinbut that doesn't affect the performance I assume?
13:03:32Araqsue it does, allocShared uses a lock
13:03:35Araq*sure
13:03:45BitPuffinbut that's no good
13:04:18Araqwell according to you you only allocate once
13:04:26BitPuffinyeah
13:04:41Araqso taking a lock for that allocation is irrelevant
13:04:42BitPuffinguess it wouldn't ever need to lock if everyone is only reading
13:05:36Araqwell just to be clear the code does: aquire(heapLock); result = allocateSomehow(); release(heapLock)
13:05:59BitPuffinright
13:06:01Araqyou don't have to do anything with that heap lock and it only affects the allocation itself
13:06:09*DAddYE joined #nimrod
13:06:18BitPuffinAraq: and reading causes no lock?
13:07:02Araqwhat do you mean? myPointer[] surely doesn't lock
13:07:15BitPuffinyeah that
13:07:17BitPuffincool
13:07:21BitPuffinwell hrm
13:08:00BitPuffinI guess to get the data from thread to thread (even if nobody is owning, just the thread that is really controlling it) I should still send it through a message
13:09:01Araqyou can do that, yes
13:09:20BitPuffinAraq: does actors have the same kind of inefficiency? Like if I want to generate 100 trees, is it fine to use 100 threads for that?
13:09:50BitPuffinI'll probably be using both but for different purposes
13:10:43*DAddYE quit (Ping timeout: 250 seconds)
13:10:53Araqactors have some shitty thread abstraction, so you create a thread pool of N that work on the tasks
13:11:36Araqso it would use N threads to work on 100 trees
13:11:54BitPuffinyeah sure my computer sure as hell don't have 100 cores or whatever
13:12:21BitPuffinso it doesn't make that much sense to use 100 threads
13:12:35BitPuffinor oh it doesn't adjust automatically?
13:12:51Araqnope
13:14:07BitPuffinwell, I guess one could get that with some system call
13:14:33Araqso why do I say it's a "shitty" abstraction? good question. It's because there is thread-local storage but not task-local storage.
13:15:09BitPuffinmm gotcha
13:15:23BitPuffinyou mean that multiple actors might be able to access the same memory
13:15:34Araqand people spend lots of work to make thread local storage as efficient as possible. That's hard to get with task-local storage.
13:15:53BitPuffingoroutines xD
13:16:03*BitPuffin prepares to get slapped
13:16:15*Araq slaps BitPuffin
13:16:19BitPuffinouch
13:18:58BitPuffinI wonder if I should even spend the time to make this game so heavily threaded
13:19:02BitPuffinI mean it's kind of cool
13:19:14BitPuffinbut really it's not a heavy mega super game
13:19:28Araqdon't thread it then
13:19:34fowllets replace error messages with haikus
13:19:38BitPuffinofc some things should be threaded
13:19:46BitPuffinlike generating trees etc
13:19:48Araqespecially if you have a deadline to meet
13:20:00BitPuffinbut maybe sending messages etc to a rendering thread is overkill
13:20:01BitPuffinI do
13:20:26AraqI'd rather optimize after profiling and still keep everything single threaded
13:20:41Araqthough admittedly somethings are easier when you use threads
13:20:47BitPuffinhow come?
13:21:15Araqbecause multithreading in a domain where global state abounds simply is no fun
13:21:29Araqand games are all about global state
13:21:42BitPuffinyeah
13:21:48BitPuffinI mean you can thread some things easily
13:22:02BitPuffinlike loading assets etc
13:22:40fowlhehe
13:22:42fowl"ass"ets
13:23:16BitPuffinbut for some reason it can get really difficult to thread things like physics simulation and AI etc. Which is weird considering how those things surely aren't single threaded in real life :P
13:23:19fowllibjit, if anyone cares: https://gist.github.com/fowlmouth/7841229
13:23:43BitPuffinfowl: make something you can sell instead
13:23:51fowlBitPuffin, are you saying string theory is not threads?
13:24:55fowlBitPuffin, im not good at selling things
13:25:04fowlor making things
13:25:32BitPuffinfowl: sure you are. Just make some lame android/ios game or something and sell it for a buck
13:25:50fowlbut i hate java and dont own the mac
13:26:18BitPuffinfowl: you don't need java and you don't need mac for android
13:26:38BitPuffinfowl: use the ndk
13:26:46BitPuffinset yourself a deadline of like 1 month
13:26:46fowlim pretty sure you need at least some java for android and i was talking about mac for iso
13:27:30BitPuffinfowl: well maybe a line or two I dunno. Not something that you need to write yourself, doesn't gradha already have samples for it on github? steal it
13:27:41BitPuffinhttps://github.com/gradha/nimrod-on-android
13:28:31Araqfowl: semicolons? you'll burn in hell for this one ... ;-)
13:28:47fowlthere is like no nimrod in Nimrod/examples/cross_calculator/android
13:28:58BitPuffinyou'll figure it out
13:29:07BitPuffinstop the excuses and get to it :)
13:29:39BitPuffinI have to go
13:29:42BitPuffinbut I'll be portable
13:29:55fowlAraq, its copied from a c example
13:30:03Araqfowl: I know
13:30:06PortablePuffinawwwwww yeeeeeee
13:31:16AraqPortablePuffin: your son surely is straining sometimes
13:34:07*BitPuffin quit (Ping timeout: 250 seconds)
13:35:05PortablePuffinAraq: Yes, I'm gonna give him a real beating later on
13:39:18PortablePuffinfowl: seriously though do some project like that. It can only cause good things!
13:40:32fowli dont want to write java
13:40:41fowlnot now, not never
13:41:31Araqsee you later guys
13:41:36PortablePuffinfowl: *sigh* you only need to bootstrap with java
13:41:36fowlcya
13:42:09fowlPortablePuffin, ive talked about this at length with grADHa, you have to write 99% java
13:42:33PortablePuffinfowl: what! how come
13:43:34PortablePuffindoesn't sound right
13:44:06PortablePuffincompile nimrod to java lol
13:44:38PortablePuffinfowl: jruby?
13:47:09fowli thought about that but ive been in ruby channels long enough to see enough complains about jruby to know that it suxx
13:48:09PortablePuffinhaha
13:48:18PortablePuffinwell maybe that's changed
13:54:42*PortablePuffin quit (Ping timeout: 246 seconds)
14:02:15*PortablePuffin joined #nimrod
14:04:34*dyu joined #nimrod
14:06:09*PortablePuffin quit (Read error: Connection reset by peer)
14:07:16*io2 quit ()
14:07:43*DAddYE joined #nimrod
14:11:23*radsoc joined #nimrod
14:11:50*DAddYE quit (Ping timeout: 240 seconds)
14:13:50radsocHi, has anybody tried 'eval'? I get: Error: undeclared identifier: 'eval'. eval is part of system, no?
14:27:33KoodaHm, I have something odd happening at runtime
14:28:20KoodaI have a type which is an object of 4 uint32, when I try to fill it I get “(invalid data!)” in all the fields, what does it mean?
14:36:05*dyu quit (Ping timeout: 250 seconds)
14:40:04fowlKooda, repr() derps on uints, it always shows (invalid data!)
14:40:15KoodaAh…
14:40:49fowldid you report the bug you found yesterday
14:41:13KoodaNo, I think it already exists
14:42:00KoodaWell, there’s a lot of integers related PR
14:45:07Koodafowl: also, why is the rational behind discouraging the use of unsigned integers? :o
14:45:11Koodawhat is*
14:45:33KoodaI *have* to work with them, and it’s pretty painful
14:45:55Kooda(I have to use pointers and unsigned integers of various sizes ^^')
14:49:37fowlhmm import unsigned
14:49:46KoodaYes yes, but why? :Þ
14:50:11KoodaAlso, I use ntohl(), which is for int32 in nimrod but uint32 in C… That’s confusing
14:50:35KoodaBoth should exist, imo.
14:55:24fowlnimrod has ntohl?
14:57:45KoodaIn sockets
14:58:30fowlradsoc, eval is disabled
14:59:50radsocthanks fowl! Do you know why? I have to use a macro?
15:00:41OrionPKMjesus, -23 C out
15:01:21fowlradsoc, what are you trying to do?
15:03:36Koodafowl: $ works for pretty printing my structure, where repr() fail
15:03:42KoodaThat’s odd ^^'
15:06:27radsocfowl, I need to duplicate a template call for different parameter values.
15:06:44*webskipper joined #nimrod
15:07:54radsocIf I use a variable I get: Error: constant expression expected
15:08:34*DAddYE joined #nimrod
15:10:23fowlKooda, I dont see an issue for the repr problem or the uint problem you had from last night
15:10:59fowlradsoc, you mean calling a template with different parameters? you cant do this?
15:11:48Koodafowl: ok, I’ll report them then :
15:11:49Kooda:)
15:12:41*PortablePuffin joined #nimrod
15:13:48*DAddYE quit (Ping timeout: 246 seconds)
15:13:59radsocYes, but I don't want to type: myTemplate(1) myTemplate(2) myTemplate(3) and so on. I'd like to have: for i in 1.100: eval("myTemplate(" & $i &")")
15:14:48fowlmytemplate(i) doesnt work?
15:20:21radsocNo, I get: "Info: instantiation from here" and "Error: constant expression expected" because somewhere in my template code I have array[0..i, char]. I want to duplicate the code inside my template so I need multiple const, not a var.
15:21:26radsocdoes it make sense?
15:21:41fowlradsoc, arrays are fixed sized
15:21:41*PortablePuffin quit (Read error: Connection reset by peer)
15:21:48*PortablePuffin joined #nimrod
15:21:58fowlyou cannot say in this iteration i want the array to hold 2, the next one i want it to hold 3
15:22:00*EXetoC joined #nimrod
15:22:37fowlyou can replace it with a seq (use newseq[char](i+1) to get the same effect)
15:22:39radsocNo, I want the code to be duplicated at compile time
15:25:13radsocI can't use a seq in my configuration. We had a conversation about that with Araq yesterday.
15:26:02dom96Perhaps you should use a macro to generate those template calls.
15:26:42dom96You should be able to use 'emit' in a macro to do what you want.
15:27:44fowlwell if you {.unroll.} the loop then you should be able to do this, but i just tested it and it doesnt work
15:28:03radsocdom96: I tried emit but I also get Error: undeclared identifier: 'eval'
15:29:06fowli will write something for you.. one sec
15:30:53dom96radsoc: how did that happen? Are you emitting 'eval'?
15:31:13AraqI removed system.eval as I couldn't see the point of it
15:31:21Araqwe have 'static' for it now
15:31:34Araqand "eval" is a confusing name
15:32:09*joelmo joined #nimrod
15:33:33Araqhi joelmo welcome
15:33:46fowlradsoc, try this: https://gist.github.com/fowlmouth/aa06e723494708c8d21b
15:33:57joelmohi Araq, thank you :)
15:34:02Araqradsoc: you surely could use a sequence but I can't see that being faster than a string
15:34:04radsocdom96: no I didn't emit an 'eval' but I guess emit calls eval
15:34:30Araqgood point, I'll remove emit too then
15:35:53dom96Araq: er, perhaps you should deprecate it?
15:36:09AraqKooda: unsigned arithmetic is brain dead, http://critical.eschertech.com/2010/04/07/danger-unsigned-types-used-here/
15:37:30Araqdom96: in general I agree with you, but in this case I find both eval and emit too annoying to provide a deprecation path
15:37:48AraqI could move 'eval' to macros.nim I guess
15:38:13radsocfowl: thanks, I'll try to understand your gist!
15:38:44fowlradsoc, you can add at the end of the macro "echo(repr(result))" to see the resulting code
15:39:22dom96Araq: Fair enough
15:39:50*PortablePuffin quit (Ping timeout: 240 seconds)
15:39:58Araqfowl: the 'unroll' pragma does nothing currently
15:40:08Araqand the docs say so
15:41:26fowloh
15:41:45OrionPKMyou shouldnt be too afraid of breaking code :P
15:41:51OrionPKMit's < 1.0 still
15:42:16*XAMPP_ quit (*.net *.split)
15:42:17*noam quit (*.net *.split)
15:42:17*reactormonk quit (*.net *.split)
15:43:13radsocAraq: eval syntax is a lot simpler than macro (from a user point of view)
15:43:18*PortablePuffin joined #nimrod
15:43:38*PortablePuffin2 joined #nimrod
15:43:38*PortablePuffin quit (Read error: Connection reset by peer)
15:44:09radsocmoving 'eval' to macros.nim would be great
15:44:11Araqoh really? how come you used it wrong then? :P
15:44:25Araq(eval takes a block and not a string)
15:48:22*reactormonk joined #nimrod
15:48:42*BitPuffin joined #nimrod
15:49:21BitPuffinhay ho! hay ho!
15:50:00BitPuffinAraq: eval takes a brock and not a sling
15:51:32radsocI tried emit first (with a string) and didn't change when I tried with eval. But BTW none of them works!
15:51:54BitPuffinradsoc: try using admit instead
15:53:47radsocAraq: I don't think anybody needs both (emit & eval)
15:54:20Araqtemplate emit*(e: expr[string]): stmt =
15:54:21Araq macro payload: stmt {.gensym.} =
15:54:23Araq result = e.parseStmt
15:54:24Araq payload()
15:54:33Araqnow patch your macros.nim, make a pull request and be happy
15:57:16radsocAraq: I'd like to but I'm not a github user. (actually I'm not even a real developer)
15:57:29fowlthat's ok, we're not even real people
15:57:51fowlwe're figures of your imagination
15:58:22radsocI guess so!
15:58:26Araqwell then wait until somebody did it; I'm working on a different branch and switching branches annoys me :-)
15:59:45BitPuffinAraq: yeah that annoys me too
16:00:51BitPuffinin fact git annoys me
16:00:59BitPuffinso I just use hg :D
16:07:43fowlgit is scary
16:08:01*XAMPP_ joined #nimrod
16:08:01*noam joined #nimrod
16:08:24Araqradsoc: did you try a TCritBitTree or whatever I called it?
16:08:50*dirkk0 joined #nimrod
16:09:56BitPuffinin mercurial you do things the way you'd expect to do it
16:10:02BitPuffinand things are called what you'd expect
16:10:09*webskipper quit (Ping timeout: 246 seconds)
16:10:13BitPuffinlike subrepository instead of submodule
16:10:45fowldo they automatically download with the repository when you clone it
16:10:51*DAddYE joined #nimrod
16:11:03fowlor do you have to do something like git submodule init
16:11:30ZuchtoHi, I'm trying to figure out how to statically link a library to my nimrod application. Is there any documentation on this?
16:11:48BitPuffinfowl: not sure
16:12:33fowlZuchto, you have {.passl: "-lyourlib".} and use {.header: "myheader.h".} on things you {.importc.}
16:12:59BitPuffin"Notably, the 'pull' command is by default not recursive. This is because Mercurial won't know which subrepos are required until an update to a specific changeset is requested. The update will pull the requested subrepositories and changesets on demand. To get pull and update in one step, use 'pull --update'. "
16:13:02*zielmicha joined #nimrod
16:13:03fowlZuchto, heres an example https://gist.github.com/fowlmouth/7841229#file-jit-nim-L19
16:13:36Zuchtofowl: ah, ok. Thanks!
16:13:44radsocAraq: I tried to copy paste your code but I get: macros.nim(226, 8) Warning: unknown magic 'NGenSym' might crash the compiler [UnknownMagic] / macros.nim(225, 11) Error: implementation of 'macros.genSym(kind: TNimrodSymKind, ident: string): PNimrodNode' expected
16:14:24BitPuffinfowl: there is an important difference there though, hg update is a common command to changing to different change sets so it would pull the subrepos you need
16:14:57BitPuffinfowl: update has the aliases up, checkout, c so you know what it is
16:15:02*DAddYE quit (Ping timeout: 240 seconds)
16:15:18Zuchtofowl: is the LinkStatically defined by some compiletime switch?
16:15:48BitPuffinfowl: oh wait this is with pulling
16:15:54BitPuffinthat doesn't answer your question lol
16:16:51BitPuffinfowl: meh I'll just test it for you
16:17:24fowlZuchto, in this example linking statically is enabled by passing -d:linkstatically
16:17:48Araqradsoc: alright, will have a look later
16:20:25Zuchtofowl: ok, thanks
16:21:06radsocAraq: thanks, no problem
16:23:36BitPuffinfowl: it clones them by default
16:24:05BitPuffinfowl: and you can have git and svn subrepos
16:26:11BitPuffinfowl: also you don't have to add each file before every commit
16:26:37fowlusually i dont add every file in a commit
16:26:59BitPuffinwell I mean you don't need to do hg add .
16:27:35BitPuffinofc if you just want to commit some files you can
16:27:54BitPuffinhg commit src/graphics/*.nim
16:28:13BitPuffinhg commit src/io/network.nim src/main.nim
16:28:18fowloh
16:28:32fowlhow do you handle wchar_t*
16:28:45BitPuffinoh wait for the glob syntax you use -I before
16:28:50BitPuffinor --include
16:28:52*zielmicha1 joined #nimrod
16:29:25BitPuffinbut you don't need -I for a dir
16:29:34*boydgreenfield joined #nimrod
16:29:47Araqzielmicha1: I'd argue for stdout for stack traces ...
16:30:22Araq"gah, can't read the error messages"
16:30:29*zielmicha quit (Ping timeout: 250 seconds)
16:30:30Araq./foo >output.txt
16:30:49Araq"wtf? doesn't work?"
16:31:14Araq"oh right, 'stderr' is the 'correct' way of doing it. thanks for that, gcc"
16:31:31Araq"how do I redirect stderr again? no idea, let me google it"
16:31:41BitPuffinAraq: which year were you born?
16:31:48fowl2&>1 or something like that
16:32:25AraqBitPuffin: that's none of your business
16:33:48Araqinput vs output makes some sense, input vs output vs error stream is stupid IMHO
16:33:52BitPuffinAraq: too bad, I thought it would be nice to have a slogan for you like "Araq, slapping developers since <insert year>"
16:34:26Araqwhy errors? what if I have warnings too?
16:36:02zielmicha1Araq: then redirects are useless for everything else other than manual inspection
16:36:12*zielmicha1 is now known as zielmicha
16:36:43Araqzielmicha: they already are useless, most programs have something like --out:filename
16:36:44zielmichaAraq: and you know there is "2>&1" and even "&>" in bash
16:37:14Araqprograms dumbing their results on stdout are not common anymore anyway
16:37:21Araq*dumping
16:37:41zielmichaso you know any language than prints stacktraces to stdout?
16:38:37Araqwell I know GCC is annoying with its approach to "correctness"
16:39:18zielmichawell, GCC is a compiler, not a runtime
16:39:37Araqstack traces are arguably not really part of the runtime
16:40:15Araqhowever I can live with a patch that uses stderr but allows me to override with -d:useStdoutForStackTraces or something
16:40:38zielmichaok, I will write one
16:42:28zielmichaand "stackTraceNewLine*: string ## undocumented feature; it is replaced by ``<br>``" is a really bad idea
16:42:59zielmichaif user can controll error message than he may write <script>doevilthings</script> to html if he manages to cause error
16:43:04zielmichaunless I'm missing something
16:43:12Araqit's really nice for cgi apps
16:43:35Araqwhich are so uncommon these days that we could remove it, I guess
16:43:39zielmichabetter solution would be "var printBeforeStacktrace"
16:43:49zielmichaand use printBeforeStackTrace = "<plaintext>"
16:43:51Araqthat misses the point though
16:43:59Araqoh wait
16:44:01Araqhmm
16:44:48ZuchtoSo, when dynamically linking to a library using the {.dynlib.} pragma it doesn't show up when i then run ldd on the executable. Could someone explain this to me?
16:44:54Araqwell I dunno, I can't see how a user can affect stackTraceNewLine
16:45:14AraqZuchto: nimrod uses dlsym to load symbols
16:47:10ZuchtoAraq: ok, is there any way to have nimrod actually add the library as a dynamically linked dependency then?
16:47:23AraqZuchto: there are lots of ways
16:47:54Araqyou can use --dynlibOverride:foo and --passL:libfoo.a instead
16:48:23Araqyou can use --verbosity:2 at compile time to see the dependencies
16:48:45Araqok ... that's about it I guess ;-)
16:49:09fowlwchar_t* in nimrod, how?
16:49:34Araqzielmicha: so users can crack stackTraceNewline but not printBeforeStackTrace? how does that work?
16:49:55zielmichaAraq: <plaintext> is special, it causes browser to stop interpreting HTML
16:50:03zielmichayou can't close it
16:50:22zielmichathought this is non-standard
16:50:27Araqzielmicha: so? I can make it <script>evil</script> instead according to you?
16:51:27zielmichaI mean, if you use: raise newException(MyError, "invalid user input: $1" % [somethingControlledByUser])
16:51:40ZuchtoAraq: hmm, I think I was unclear about what I was actually asking for :) If I have libfoo.so as a dynamic dependency, is there any way to have this be listed when I do `ldd executable`?
16:52:08zielmichaand user provides somethingControlledByUser="<script>evil</script>" than it will go to stdout with stacktrace
16:52:27zielmichaand browser will interpret it (I think, I haven't read cgi module source)
16:52:28AraqZuchto: I don't think so, but as I said you can link in a conventional way too
16:52:48fowlstacktracefilter: proc(x: string): string
16:52:49ZuchtoAraq: ok, thanks for taking your time :)
16:52:59fowlset it to htmlentities() in cgi.nim
16:53:20zielmichaZuchto: maybe {passl: "-lmylib"}?
16:53:23Araqfowl: that's what I fear too
16:53:46Zuchtozielmicha: but that would just statically link the library, yes?
16:54:05zielmichano (assuming you don't pass -static to compiker)
16:54:11Araqzielmicha: alright fair point, but that doesn't argue against stackTraceNewLine at all
16:54:28Araqbut against exception messages being not escaped
16:54:56zielmichayes, but than we can have fowl's stacktracefilter than will do htmlspecialchars(foo) & "<br>"
16:55:35zielmichaand do the same without need for stackTraceNewLine
16:55:50zielmichaand I think this is not enough
16:55:52Zuchtozielmicha: ah, thanks!
16:55:59Araqok, I'm sold
16:56:22zielmichaPython's cgitb.py has complicated code than closes headers, <script> tags, html comments
16:56:41zielmicha(i.e. what happens if exception happens when you are echoing <script> tag?)
16:57:35fowlwell you could just replace \L with <br/> in the filter function, or wrap the trace in <pre> or w/e
17:00:23zielmicha(https://github.com/python-git/python/blob/master/Lib/cgitb.py#L30)
17:01:42*fundamental2 joined #nimrod
17:03:42Araqwell I dunno. a filter function looks good but requires more discussions/thought
17:03:48Araqbut bbl
17:05:07*fundamental quit (Ping timeout: 260 seconds)
17:06:13*q66_ joined #nimrod
17:06:18*hoverbear joined #nimrod
17:06:39*q66 quit (Disconnected by services)
17:06:41*q66_ is now known as q66
17:08:45*mflamer joined #nimrod
17:12:02*DAddYE joined #nimrod
17:16:14*DAddYE quit (Ping timeout: 240 seconds)
17:26:48*PortablePuffin2 quit (Ping timeout: 246 seconds)
17:30:55radsocfowl: the code you gave me works great. thanks a lot.
17:37:13ZuchtoOk, yet another question about linking. I can statically link a library using {.passl: "/usr/lib/libfoo.a".} and that works great... but it means I have to actually specify that the library is in /usr/lib... can I somehow tell the compiler to search for the file where it expects to find it?
17:37:29Zuchtosimilar to how the "-lfoo" flag works
17:37:47zielmichaI think you can't, without -static (and then just use -lfoo).
17:37:48fowlidk, i was under the impression that -lfoo was static linking
17:37:59fowl<- drunk
17:38:04*PortablePuffin joined #nimrod
17:38:06zielmichabut probably there is a script like ldconfig which can find it
17:38:09Zuchtozielmicha: yeah, only problem with -static is that it statically links _everything_
17:38:34Zuchtofowl: no, it just adds it as a dynamic dependency (which is statically listed in the executable :))
17:43:45Zuchtooh, figured it out! by passing "-Wl,-static -lfoo -Wl,-Bdynamic" to the compiler it works as it should... at least in gcc :)
17:58:52Amrykidfowl, I saw your PR
17:59:04Amrykidmerged it
18:00:38*ics quit (Ping timeout: 250 seconds)
18:05:35*ics joined #nimrod
18:13:14*DAddYE joined #nimrod
18:17:26*DAddYE quit (Ping timeout: 240 seconds)
18:18:41fowlyay
18:18:46fowli contributed^^;
18:20:50EXetoCBitPuffin: I don't know when you added the warning to TStream, but pointer should be the same thing as void*: both are pointers to untyped memory
18:21:33EXetoCI'm trying to port one of the examples now. some error is being raised though
18:21:57*Hannibal_Smith joined #nimrod
18:22:45BitPuffinEXetoC: I haven't added a warning :o
18:22:59BitPuffinor do you mean a comment?
18:23:28*boydgreenfield quit (Quit: boydgreenfield)
18:23:39EXetoCBitPuffin: ok warning comment
18:24:44BitPuffinEXetoC: uh, I can't remember what the reasoning I came up with was
18:24:45Araqthinking about it some more ... we need an "exceptionMessageFilter" instead
18:25:06BitPuffinEXetoC: I know that there is one place that takes a *void though and 2 or so that takes **void
18:25:06Araqit doesn't make sense to filter stack traces the same way as user level error messages
18:25:15BitPuffinso TStream = pointer
18:25:20BitPuffinused where it's a *void
18:25:26BitPuffinand PStream = ptr TStream
18:25:31BitPuffinused where it's a **void
18:25:33BitPuffinor something like that
18:26:29BitPuffinEXetoC: would be awesome if you figured out the error and patched it if there is a problem with the binding
18:26:53EXetoCyes, so PStream only serves as documentation. still useful in other words
18:27:08BitPuffinI'm currently working on graphics for my engine since you guys are only horny for screenshots and not soundshots
18:27:21*mflamer quit (Ping timeout: 246 seconds)
18:27:24BitPuffinEXetoC: Yeah and sprinkling some typing on it or something like that
18:27:26fowlprotip: dont use type X = pointer because type X functions match for other generic pointers
18:27:33fowluse "ptr object"
18:27:36EXetoCI don't think there's anything wrong with the related types in the binding, but I will try the C example
18:28:03EXetoCfowl: when the equivalent in C is void*?
18:28:24EXetoCwhich it is, but I'll see if it makes sense to introduce a dummy type
18:28:38Araqbut ... generating stack traces and making them part of the generated HTML is horrible really. I guess CGI needs a stderr stream lol
18:29:37Araqoh well who uses cgi in production these days anyway
18:29:39fowlEXetoC, at least use distinct pointer, the downside to thise is you have to borrow functions like isNil whereas ptr object just works
18:31:01Araqfowl: people should pay you for giving "nimrod - best practices"
18:32:04fowli know right
18:32:18fowlmail me the change you found under your couch, you werent using it
18:48:33fowlZuchto, thanks
18:50:27*radsoc quit (Ping timeout: 250 seconds)
18:50:58Araqfowl: there is system.WideCString
18:51:27Araqand newWideCString("foo")
18:52:11fowli dont see wideCstring in system
18:52:37Araqwell there is system/widestrs.nim and it's included
18:52:43Araqbut maybe only on windows :P
18:53:44Zuchtofowl: likewise
18:58:43*webskipper joined #nimrod
19:07:03zielmichamaybe something like Python's sys.excepthook would make sense, instead of filters
19:07:18zielmichasys.excepthook is a function that is called when interpreter would print stacktrace
19:08:31zielmichathe cgi one could, for example "<pre>"getStacktraceToString().htmlspecialchars
19:08:44zielmichaand than echo it
19:09:22zielmichait's better than message filter in that it could for example generate html by inspecting frames manually (if it's supported)
19:10:26fowlso the default exception hook would be stderr.write(backtrace())?
19:13:06zielmichayes
19:13:42zielmicha(other possible use case: error reporting to central error reporting service like Sentry)
19:14:12Araqactually we already have a raiseHook for that
19:14:28*DAddYE joined #nimrod
19:16:55*PortablePuffin quit (Ping timeout: 246 seconds)
19:18:40*DAddYE quit (Ping timeout: 246 seconds)
19:19:02Araqand btw hooks suck for verification
19:20:46zielmichalocalRaiseHook and globalRaiseHook are not the same
19:21:30zielmichathey are called even if there are pending try..except, if I understand code correctly
19:23:07*viteqqq joined #nimrod
19:23:10Araqhmm true
19:23:15Araqhi viteqqq welcome
19:24:47viteqqqhi there
19:32:06*ics quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
19:33:37OrionPKMaraq are there any examples of using CaaS TCP server?
19:33:57Araqthere are lots of tests
19:34:24OrionPKMI see the tests folder, but none of them seem to actually show connecting to the service, maybe i'll look more closely
19:38:11fowlhttp://adamralph.com/2013/12/06/ndc-diary-day-3/?1
19:38:14fowlnew stuff in c#
19:41:34Hannibal_SmithI'm a C# programmer, and I can't find anything that would make my code better
19:42:41*DAddYE joined #nimrod
19:42:44*DAddYE quit (Remote host closed the connection)
19:42:50*DAddYE joined #nimrod
19:43:19fowlnow your one line functions don't need braces
19:43:44Hannibal_SmithAnd create more style inconsistency
19:45:34Hannibal_SmithPrevious version of the language, at least added some good addiction for "daily use" code
19:45:46Hannibal_SmithLike Linq, async, dynamic...
19:45:56Hannibal_SmithNow I have nothing
19:46:06fowlyou still have those things :D
19:46:14Hannibal_SmithProbably there is more that MS are keeping secrets
19:46:37Hannibal_Smithfowl, after using C++...I really like generic programming
19:47:11Hannibal_Smithfowl, probably now the think I would like is a jit like the OracleVM one
19:47:22Hannibal_SmithNot more language features
19:48:02Hannibal_Smith*the thing
19:50:16Hannibal_SmithAh fowl and probably, some people migrated from C# to F#
19:51:06Hannibal_SmithProbably the same people who in the past would use some of these new features
19:51:34Hannibal_SmithBut now get directly a better language
19:51:52Hannibal_SmithAnd not a "blob" that is C#
20:19:40*PortablePuffin joined #nimrod
20:21:45ZuchtoQuestion: If you want to pass a structure as through a function in a C library that will populate the structure with information (in other word, the C function doesn't store a pointer to the structure) would there be any case where the structure (in nimrod) still has to be a ptr rather than a ref?
20:26:25EXetoCPortablePuffin: ok I hear some horrible noise now
20:26:38EXetoCshould sound like a saw wave, but at least it's working
20:27:55*Hannibal_Smith quit (Quit: Sto andando via)
20:46:25AraqZuchto: when you can 'new' it, you can make it a 'ref'
20:49:35ZuchtoAraq: Yes, but I guess what I'm asking for is if there are any sneaky edge-cases where you would think you could use a ref but you really should use a ptr... but I guess it's a bit too wide question for it to be meaningful.
20:49:56OrionPKMaraq couldnt find anything about testing the caas tcp server
20:50:03OrionPKMjust stdin
20:51:51Araqhow do you start a new terminal? clicking on your shortcut icon in the task bar was the old way
20:52:15Araqnow I have to type in "cmd" in the search field to get a fresh terminal. Thank you Microsoft.
20:52:51AraqAnd thank you too Apple for showing the world how to ruin a task bar.
20:53:09Araqof cource everybody needs to copy Apple's braindead and utterly broken approach.
20:53:35OrionPKMi'm hitting it from python
20:54:10AraqOrionPKM: now that I got a new terminal, I could grep for it ;-)
20:54:21Araqhave a look at compiler/service.nim
20:54:44EXetoCZuchto: can't think of any reasons why it'd cause any problems in that case
20:54:50EXetoCanyway, maybe you could wrap the pointer
20:56:02OrionPKMaraq hmm, ok
20:56:02AraqZuchto: it really depends on who allocates the memory. If the C library allocates, you can't use a 'ref'
20:56:44Araqgood libraries provide both Foo* newFoo() and void initFoo(Foo* f)
20:57:10Araqunfortunately there are barely any good libraries around
20:57:13Zuchtothen i really wish more libraries where good :P
20:57:37Zuchtook, thanks for answering my very vague question :)
20:58:23Araqhey, it's C everything can talk to C. No need for good libraries when you're building on a fundament of ignorance.
20:58:58OrionPKMaraq huh.. it crashes when I run from cmd line vs running it from a subproc in ST
20:59:49AraqOrionPKM: well the people who could develop it further are busy patching Nimrod to become more like haskell. ;-)
21:00:02OrionPKMlol
21:03:04*brson joined #nimrod
21:05:40*brson_ joined #nimrod
21:08:47*oszo joined #nimrod
21:08:53Araqhi oszo welcome
21:09:10OrionPKMaraq, getting this: 'N_NOINLINE' # define N_NOINLINE(rettype, name) rettype __attribute__((noinline)) name
21:09:14OrionPKMruntime error
21:09:26*brson quit (Ping timeout: 240 seconds)
21:09:38*oszo quit (Client Quit)
21:09:55AraqOrionPKM: idetools is supposed to run the C compiler
21:09:59Araq*is not
21:10:24OrionPKMstrange then
21:10:34OrionPKMgcc.exe: error: E:\Development\IRCFamiliar\trunk\src\nimcache\trunk_.o: No such file or directory
21:10:38OrionPKMthats happening at runtime
21:10:38*viteqqq_ joined #nimrod
21:12:39*viteqqq quit (Read error: Connection reset by peer)
21:12:57AraqEXetoC: fyi http://critical.eschertech.com/2010/05/26/specification-with-ghost-functions/
21:13:20Araqthis has 'pre' and 'post' conditions and they are verified, not sugar for 'assert'
21:15:03Zuchtoso the overload resolution doesn't look at expected return type or if the procedure is exported?
21:16:17Zuchtooh wait... the problem isn't related to export
21:16:20Zuchtomy mistake
21:16:24*PortablePuffin quit (Ping timeout: 246 seconds)
21:27:24*ics joined #nimrod
21:47:28*PortablePuffin joined #nimrod
21:51:01zielmichaAraq: what about merging https://github.com/Araq/Nimrod/pull/702 (quoteIfContainsWhite)? Does it need improvements? Or should I squash commits?
21:52:49Araqmake the 'let safeUnixChars' a 'const' please and it's perfectly fine
21:56:58zielmichadone
21:59:54NimBotAraq/Nimrod master 5dd5c78 Michał Zieliński [+0 ±2 -0]: Make quoteIfContainsWhite quote argument, so it can be safely passed to shell.... 6 more lines
21:59:54NimBotAraq/Nimrod master 887466d Andreas Rumpf [+0 ±2 -0]: Merge pull request #702 from zielmicha/master... 2 more lines
22:00:27Araqthanks for nagging btw, it's bad to not merge pull requests in a timely fashion
22:01:16*mflamer joined #nimrod
22:01:41Araqmflamer: you have a new job
22:01:47Araqcongrats
22:02:07Araqpeople really want idetools to work ... ;-)
22:02:31Araqand you're definitely up for the task I think
22:03:42Araqzielmicha: instaed of let output = when defined(useStdoutForStackTraces): stdout else: stderr
22:03:53AraqI'd prefer:
22:04:18Araqwhen defined(weReallyHateStdErr):
22:04:29Araq template stdmsg*: expr = stdout
22:04:30Araqelse:
22:04:35Araq template stdmsg*: expr = stderr
22:04:53Araqfor system.nim :-)
22:05:21zielmichamaybe you just need to patch kernel to pipe fd 2 to fd 1?
22:05:22EXetoChttps://gist.github.com/EXetoC/528d88cfa5bc2ca69b19 this crashes on line 21. cb is passed to opendefaultstream as you can see. it works when 'output' isn't a var
22:06:07Araqzielmicha: ultimately indeed I'll write my own OS :P
22:06:14EXetoCactually, maybe I don't need to modify 'output'. I need to check the C source again
22:06:54EXetoCit's incremented, right? "*out++ = data->left_phase"
22:08:30AraqEXetoC: I never checked codegen for a pointer to (a pointer to?) a function
22:09:09Araqiirc (*fn)() is the same as fn() in C and it wents downhill from there (who said C is good at pointers?)
22:16:59*PortablePuffin quit (Ping timeout: 246 seconds)
22:18:37ZuchtoIs it possible to dereference a variable that I've declared as a ref? My code is essentially: "var a: ref TFoo ; new(a) ; some_c_function(a) ; result = a" and I want the returning value to be an actual object, not a reference.
22:23:03Araqsome_c_function(a[])
22:23:11EXetoCAraq: no, output is "void *outputBuffer", but it doesn't matter because what I was trying to do makes no sense
22:24:00Araqapperently fn() is the same as (*fn)() but when you need a pointer to that you have no choice but to use (**fn)()
22:24:39*Araq needs an Ansi C standard under his pillow
22:26:13zielmichahow does compiler looks for modules? Is there a way to add directory to search path?
22:26:29EXetoCI don't think we're talking about the same thing, but it doesn't matter anymore
22:26:48EXetoCzielmicha: see the help output and nimrod.cfg
22:26:57ZuchtoAraq: if a is of type [ref TFoo] then what is the type of a[]?
22:26:59EXetoC/etc/nimrod.cfg in linux
22:27:10AraqTFoo?
22:27:16EXetoCyou can also create project-specific configs
22:27:36zielmichaNo way to do this at compile time?
22:27:42zielmichafrom macros, for example
22:27:47ZuchtoAraq: ok, and I need to pass a ref TFoo into the c-function but I want to return a TFoo from the procedure, is this possible?
22:28:29Araqonly with some inefficiency
22:28:38ZuchtoI see
22:28:57Araqor with hacks ;-)
22:29:30Araqsounds like you want to make the C function take a ptr TFoo though
22:29:30Zuchtoi guess the easiest way would be to use create a new object and copy all the values from the ref TFoo?
22:29:44ZuchtoAraq: how so?
22:30:14AraqZuchto: then you can simply use 'addr' of your TFoo value
22:31:16Zuchtohmm... ok
22:31:34fowl myref[].addr
22:31:42fowl&(*myref)
22:31:54Araqfowl: yeah but that produces a 'ptr'
22:32:10*PortablePuffin joined #nimrod
22:32:16Zuchtothe unsafeness of addr wouldn't be a problem since the reference wouldn't be kept outside of the function anyways, right?
22:32:23Araqright
22:33:11*ics quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
22:37:35AraqEXetoC: if proc `+=`*[T:float32|float](x: var T, y: type(x)) provides an implicit conversion of the 2nd argument but (var T, T) does not that's a bug
22:40:03*mflamer quit (Ping timeout: 246 seconds)
22:41:29EXetoCI suck at this
22:42:39Araqzielmicha: what's the status of https://github.com/Araq/Nimrod/issues/701 ?
22:43:45zielmichawith new quoteIfWhite it's no longer security issue, but the flag is still rather unfortunate
22:44:06EXetoCI think I tried to shorten the code while fixing the bug, but there's no way to get the un-qualified type, so I guess it can't be done
22:44:32Araqwell I copied it over from FPC, zielmicha
22:44:44zielmichaI plan to someday add poUsePath flag and maybe make code clearer
22:45:00Araqthat would be nice, osproc is my nightmare
22:45:18zielmichaAh, I mentally copy everything from Python :)
22:45:29Araqwhenever I change something there I break things for some obscure OS
22:47:11Araqtook me a good deal amount of time to figure out how to use posix_spawn
22:48:28Araqwas happy when I got it to work. I learned later that posix_spawn is not supported on Posix compatible OSes
22:49:25OrionPKMblarg im getting those errors with stdin as well
22:52:03EXetoCAraq: So, only the second parameter should be generic, right? and then I need to add additional overloads
22:52:41*zielmicha quit (Ping timeout: 250 seconds)
22:53:37AraqEXetoC: well I think (var T, T) should work and provide the implicit conversion for T
22:53:57Araqespecially when 'type(x)' already seems to provide it
22:54:05Araqmakes no sense they behave differently
22:55:06*dirkk0 quit (Quit: This computer has gone to sleep)
22:58:49*mflamer joined #nimrod
22:59:11EXetoCAraq: what I said makes no sense, and I guess you're referring to a compiler bug
22:59:49Araqlol yes
23:03:51*mflamer quit (Ping timeout: 246 seconds)
23:17:31*PortablePuffin quit (Ping timeout: 260 seconds)
23:20:32*BitPuffin quit (Quit: WeeChat 0.4.2)
23:25:26EXetoCAraq: should other procs me merged when this works? might as well just separate these functions otherwise, and not have to deal with this 'type' bug in this case
23:27:40Araqdunno. there is an important edge case which I forgot.
23:28:13Araqall I remember is that it's really important to consider "this"
23:28:46Araqwhere "this" is what I forgot :P
23:30:54EXetoCok, well I'll give it a go once this is fixed
23:31:20Araqcheck if it already is please
23:31:37AraqI remember a change in the compiler affecting this
23:36:18EXetoCif it is a compiler bug that you were referring to, doesn't this imply that you just tested it?
23:36:54EXetoCdo integers need those two sets of compiler magics, compared to the ones for all float types, that end with F64?
23:37:44*PortablePuffin joined #nimrod
23:38:47Araqgah, don't ask me now
23:38:56AraqI'm working
23:40:51*mflamer joined #nimrod
23:47:57*mflamer quit (Ping timeout: 246 seconds)
23:49:07EXetoCok, cya later
23:53:48*mflamer joined #nimrod
23:56:19*PortablePuffin quit (Ping timeout: 260 seconds)